summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2012-03-24 09:26:18 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2012-03-24 09:26:18 +0000
commit209e66836e1dcbf0d8f2ad9b0aa32a8666ede045 (patch)
treeac6ad69a84acc2893fe89911a483fc12139f87e4 /net-dns
parentAdd sci-chemistry/ccp4-apps to DEPs for dyndom, thanks urcindalo pointing me ... (diff)
downloadhistorical-209e66836e1dcbf0d8f2ad9b0aa32a8666ede045.tar.gz
historical-209e66836e1dcbf0d8f2ad9b0aa32a8666ede045.tar.bz2
historical-209e66836e1dcbf0d8f2ad9b0aa32a8666ede045.zip
Remove unused djbdns-setup. Thanks to Michael Orlitzky <michael@orlitzky.com>. Bug #408351
Package-Manager: portage-2.2.0_alpha94/cvs/Linux x86_64
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/djbdns/ChangeLog7
-rw-r--r--net-dns/djbdns/Manifest36
-rw-r--r--net-dns/djbdns/djbdns-1.05-r23.ebuild10
-rw-r--r--net-dns/djbdns/djbdns-1.05-r24.ebuild6
-rw-r--r--net-dns/djbdns/djbdns-1.05-r25.ebuild4
-rw-r--r--net-dns/djbdns/files/djbdns-setup387
6 files changed, 229 insertions, 221 deletions
diff --git a/net-dns/djbdns/ChangeLog b/net-dns/djbdns/ChangeLog
index 08e001e9633a..06f02753c7ce 100644
--- a/net-dns/djbdns/ChangeLog
+++ b/net-dns/djbdns/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-dns/djbdns
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/ChangeLog,v 1.125 2012/03/02 22:57:00 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/ChangeLog,v 1.126 2012/03/24 09:26:18 hwoarang Exp $
+
+ 24 Mar 2012; Markos Chandras <hwoarang@gentoo.org> djbdns-1.05-r23.ebuild,
+ djbdns-1.05-r24.ebuild, djbdns-1.05-r25.ebuild, files/djbdns-setup:
+ Remove unused djbdns-setup. Thanks to Michael Orlitzky <michael@orlitzky.com>.
+ Bug #408351
*djbdns-1.05-r25 (02 Mar 2012)
diff --git a/net-dns/djbdns/Manifest b/net-dns/djbdns/Manifest
index 76e57dede3fa..af7a554053f3 100644
--- a/net-dns/djbdns/Manifest
+++ b/net-dns/djbdns/Manifest
@@ -7,7 +7,7 @@ AUX CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch 9914 RMD160
AUX CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch 3043 RMD160 71ec5a52edc8ba574214f1b05b38d8b9ee313b98 SHA1 c0190b0696f655822e46162489714e9b09b9e831 SHA256 0e6312ab8408d98bc3e6d1b1cddc36f51a5cd092db14bd3f84a8f47d08070c27
AUX CVE2008-4392_0002-dnscache-cache-soa-records.patch 2944 RMD160 0b58e57bc11b36113c5fef73a64c869895f83889 SHA1 ac9b6a62c62588205cc4dc71da4e0ad6630f9635 SHA256 1cd7b848305646d3015d8f2817acdced65894b8ab6e9dacb02077acebc50841b
AUX CVE2009-0858_0001-check-response-domain-name-length.patch 366 RMD160 c9a7ca8ab3e0359cd55caa0fd14ce3878d98c26c SHA1 c64bd006d5ff7ea416d6baeff062b94eebcb8c8d SHA256 8ca8bd81fa6fb17576f11de9e97a582f0c30d7f5c6e797defa41a98d33770e33
-AUX djbdns-setup 11152 RMD160 6de107a57748468996c2d7b5ed00641abf51d67e SHA1 dc9b478709699ce66b64f82f0f1fd1749af2f58a SHA256 f9cac2b3050ce0869afdb1f27af9690fd5fb4817acad1144d8b879233d979713
+AUX djbdns-setup 10881 RMD160 eabdbfd226d6ee4172e55a62beed77bb68aa222c SHA1 f056a51a5f511c54b98536c238eff8c1fecb5755 SHA256 33c64d8341ea868e124e7fe0da6a8f9ba6fc799a79584e002a82c572921ed5e4
AUX djbdns-setup-r17 10881 RMD160 eabdbfd226d6ee4172e55a62beed77bb68aa222c SHA1 f056a51a5f511c54b98536c238eff8c1fecb5755 SHA256 33c64d8341ea868e124e7fe0da6a8f9ba6fc799a79584e002a82c572921ed5e4
AUX dnscache-setup 6007 RMD160 d5a29943ac29d84a8c83308a497721010ab017bc SHA1 764e3dbecca295c307589c3141fc24c3ff0bc5a5 SHA256 5a69f71468172e9e9636f1cb22e08718a084daa0f31953aae604539d66a2603e
AUX dnsroots.patch 349 RMD160 c3be22070645e27a8c16e9f1dd268963b749c5f7 SHA1 f09404a752062956319b4ebb6d381588df467eba SHA256 99e8ef90a20f66fedf903aa13e3f5360010cf11c27c59dc53b967f02ffe06114
@@ -18,25 +18,25 @@ AUX string_length_255.patch 299 RMD160 df613f1287f6581c963e969eec7fcaec638e2b58
AUX tinydns-setup 3206 RMD160 16679596e3902c8eda4c9605b0fef6e778cdee63 SHA1 e222c22f924882a3b2d496f7d8fbdf61eb4eb0e8 SHA256 73c0610f15e9bbec1998d10eafe4222277eb8cbaf0c58e802f998e9f7b25bbea
DIST djbdns-1.05-test23.diff.bz2 18480 RMD160 33037f2a41abb49c305f3efec4402c6965c8b8b8 SHA1 34251597d211ff00791cb6546e8ef60d75ce5477 SHA256 e702f47b4a4c77fe5cec474a8219a072cfaaee07282650b7e0dd322ed82e8f33
DIST djbdns-1.05.tar.gz 85648 RMD160 a832cbfd93e4ccec6a565492a4ee0b3c1b4b68ed SHA1 2efdb3a039d0c548f40936aa9cb30829e0ce8c3d SHA256 3ccd826a02f3cde39be088e1fc6aed9fd57756b8f970de5dc99fcd2d92536b48
-EBUILD djbdns-1.05-r23.ebuild 3684 RMD160 74a29155bc31f39a9b16d39c6711b585bef06601 SHA1 f5b2e17144d3c03a2845c9bc69eb6c1e5b8f830d SHA256 fe946870ccc68646c51783d040f5f985660764b53f71ab320df46f12a5c48cae
-EBUILD djbdns-1.05-r24.ebuild 3899 RMD160 45d28e6b4579720b3d4f8b774caa3c098c820a91 SHA1 797e4858ce8513ff23be7846c23245427959d90f SHA256 f73acefc7285e65b7a3ea7e030515f41751d0fdaa143c5a5bbd958a8634307d5
-EBUILD djbdns-1.05-r25.ebuild 3972 RMD160 d382f956ac7e6bcb97b8e48271ec99a789636304 SHA1 715830d816b4e3e035d866d0664ea9f0c4fa2f59 SHA256 d8b260b9a8f33ed6dd2094a6b5114ec117234bcc3d2b8534e1744a5b120ef1c9
-MISC ChangeLog 19981 RMD160 ef6f16a950a902d407594287f2affa4825512902 SHA1 dd9dbbae90cdb40ed51aab9080248a7c0c56d7e0 SHA256 31a600b30a3981802c840c94edc6ece23baa98e12832006f07786f2fd82c14cf
+EBUILD djbdns-1.05-r23.ebuild 3688 RMD160 ca17b8df6da21a9b43568225d23833a4e42a45bf SHA1 014bffb4e1f18b8aa9301ae57572864fe37f19aa SHA256 89144b7f749856a5cff64e13f8c856f8382e2d473733d10874f6669fdb24600a
+EBUILD djbdns-1.05-r24.ebuild 3883 RMD160 42d53dc90c59cecb6378c7442b3f95a454463945 SHA1 9bd23aae6ea006965b283dfb5246468866cce405 SHA256 56329adc9b92658def3101bae259c8f847f7e6a3a4391938aa5ad53f6648d87f
+EBUILD djbdns-1.05-r25.ebuild 3954 RMD160 98bfbe59bed1b86a8a97b7e0d14ffa4fe9e35b60 SHA1 53529314890684bbb53039b9f646e809b704228a SHA256 2cd02d012f9fa37b3cc176ca2242021c0232246736a61e30154821cacd7cd13d
+MISC ChangeLog 20224 RMD160 99a492e7a4603033b253c62dbeb952d1506b7b94 SHA1 1f46e1881a5028bd08b54fd6bda00bb8a4b87261 SHA256 db25a734858bf63f2c40f72c635b87b5213b903cc9de70bd6480783d5e036d71
MISC metadata.xml 409 RMD160 7b69b690876c3e5f44ca61381a7d757b64907978 SHA1 bb4b744ec4c5ae17e26ae313b206a1bfdb2be3db SHA256 50dabe586f27b034bb8b11d38ea34ed030dcaa73221d1498859fabb914f651f0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iQIcBAEBCgAGBQJPUVBAAAoJEPqDWhW0r/LCgOkP/1/4bfRBzGx3+eolUmd0fqZK
-IDBqgQKaS9iuOptDaO2DqKx5ZqcAio8d5pCGH0DYLH7NnCu9t6RO9fbMozKKiEmb
-uXnrptC+gAXAAEklIVQQ5EZ48oftPClkwC/C/wP0zjI2H+VMhLHKGpj/waQFkt8+
-WXgjXiWy+6AXCAm9hgG8hvh4b7GG5j2uGGBGuu1qVlXnLMhuX+ASbbEjiDWW1DOD
-Iki2lU5t7xOPszpFBtG0dEsFko29gZPJXqizy23c+irXw5Kn3YWUQEeTh/4De0YR
-SW03egQOZCyr00xWgpxgNLMW0aKi6uwn9R2v5K2Fr4erGgVDf0wBrqhHAcEkKBCb
-y4LpGgb5m9763pjLa5rBLZnyhD8aygnJQc8rAlf9srHGk4TKobmGbTiQJueF5AKB
-NyHGsSZ5oG1qhU4/mZ0ruel8o+nQJmh7PkKaSWPmORFxyMHTtNYnzTAy9hBY5r75
-S+XfjwsexCVettE080L7r6MTKUzNrASqyWUj42aYXRPHLJUDsYK/HiEnOne6HSIq
-LJD5GA1YM/yKBPs70KDOC+yLiCPn2eKIpQzJXg1QSPTeN/yIZUqO4jWPLT1xsUN4
-xGTSmUo4jVg3+bP4up5RsXglvAue/PfdnJdQ2TiU2oPIR5zwq40I6lRrTR4vWFK7
-k0pmzRNA/GrPG2MdNLLV
-=inkE
+iQIcBAEBCgAGBQJPbZM+AAoJEPqDWhW0r/LCdXYQAJegdXChJV56e+leN5jhykPf
+mIa3g+A1+obTWxknyF2czeO8QcO6o49s6gMebtVMb3LC7WkuotycN1tELlMS1zRa
+0SR1HEBG5ZLaTd6YXGz0jkZtALtS33cjPePfAUwDei+yBxg0SpMz+pomwJ11rdY0
+F3XoMMytiu9HLwy9VFMv5sqTu0X1vMiYOULDkGJWd61Ouj8tY7hyNlRZBrlGMXPF
+bfPT16u9uSn31Hzp/7KleAlHaBi5oIAkMyvnN1RxxkWrfop2bt2m6G1ix4o0oSrv
+FFEMMjg/Wb+4BUe7XDdMP+99m3k720Nolsv3NffOV7uLDIc4oIChV5Jr8rC/xcx6
+haiuDabGQAmsN6wVzvFSDavha8cm3nT5/KhSVX50mEz3o/tRYxrhRXW5L9lZW4gc
+IUIHack2NT5OKfLt48bYo74MgFRs3yfxzn5CmEG2DRhG1ixryCvBs7XFxNXFJ12L
+RUVmU2ZTv6uo0L65KcrJAi0bviN68FBV+GZPK/gXFZzWixoxLA290Lhnznf2S6V9
+kHIKjBKNH9EbIh7pnBS+qUn4LspwM7UEOpkS3OH2WHiJtIwmOOzy46LE41UqVB05
+MAb+vsn29QsjZzwwJK5LiDy+ZPu4BnON2xUvFSKd1BVA7KQk9pKoSUKdmDil7yfD
+ag8gr2OGfxFy+8wHmZeV
+=VRzt
-----END PGP SIGNATURE-----
diff --git a/net-dns/djbdns/djbdns-1.05-r23.ebuild b/net-dns/djbdns/djbdns-1.05-r23.ebuild
index a62772886f84..4fe19510cbef 100644
--- a/net-dns/djbdns/djbdns-1.05-r23.ebuild
+++ b/net-dns/djbdns/djbdns-1.05-r23.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r23.ebuild,v 1.8 2011/01/29 23:36:52 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r23.ebuild,v 1.9 2012/03/24 09:26:18 hwoarang Exp $
IUSE="doc ipv6 selinux static"
@@ -114,9 +114,9 @@ src_install() {
dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION
- dobin "${FILESDIR}/dnscache-setup"
- dobin "${FILESDIR}/tinydns-setup"
- newbin "${FILESDIR}/djbdns-setup-r17" djbdns-setup
+ dobin "${FILESDIR}/dnscache-setup" || die
+ dobin "${FILESDIR}/tinydns-setup" || die
+ dobin "${FILESDIR}/djbdns-setup" || die
}
pkg_setup() {
diff --git a/net-dns/djbdns/djbdns-1.05-r24.ebuild b/net-dns/djbdns/djbdns-1.05-r24.ebuild
index 0c9f560acc00..52dc0a649da3 100644
--- a/net-dns/djbdns/djbdns-1.05-r24.ebuild
+++ b/net-dns/djbdns/djbdns-1.05-r24.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r24.ebuild,v 1.4 2011/04/11 13:08:57 c1pher Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r24.ebuild,v 1.5 2012/03/24 09:26:18 hwoarang Exp $
EAPI="2"
inherit eutils flag-o-matic toolchain-funcs
@@ -118,7 +118,7 @@ src_install() {
dobin "${FILESDIR}/dnscache-setup" || die
dobin "${FILESDIR}/tinydns-setup" || die
- newbin "${FILESDIR}/djbdns-setup-r17" djbdns-setup || die
+ dobin "${FILESDIR}/djbdns-setup" || die
}
pkg_preinst() {
diff --git a/net-dns/djbdns/djbdns-1.05-r25.ebuild b/net-dns/djbdns/djbdns-1.05-r25.ebuild
index 69d8def19c94..31eb27db92cc 100644
--- a/net-dns/djbdns/djbdns-1.05-r25.ebuild
+++ b/net-dns/djbdns/djbdns-1.05-r25.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r25.ebuild,v 1.1 2012/03/02 22:57:00 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r25.ebuild,v 1.2 2012/03/24 09:26:17 hwoarang Exp $
EAPI="2"
inherit eutils flag-o-matic toolchain-funcs
@@ -118,7 +118,7 @@ src_install() {
dobin "${FILESDIR}/dnscache-setup" || die
dobin "${FILESDIR}/tinydns-setup" || die
- newbin "${FILESDIR}/djbdns-setup-r17" djbdns-setup || die
+ dobin "${FILESDIR}/djbdns-setup" || die
}
pkg_preinst() {
diff --git a/net-dns/djbdns/files/djbdns-setup b/net-dns/djbdns/files/djbdns-setup
index 3f128b271020..ce821975029d 100644
--- a/net-dns/djbdns/files/djbdns-setup
+++ b/net-dns/djbdns/files/djbdns-setup
@@ -2,7 +2,9 @@
#
# djbdns-setup
#
-# Copyright (C) 2004 Kalin Kozhuharov <kalin@ThinRope.net>
+# Copyright (C) 2004-2006 Kalin KOZHUHAROV <kalin@thinrope.net>
+# The latest version of this script can be accessed at:
+# rsync://rsync.tar.bz/gentoo-portage-pkalin/net-dns/djbdns/files/djbdns-setup
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -16,21 +18,16 @@
# http://www.gnu.org/copyleft/gpl.html
#
-. /sbin/functions.sh
-# void ewarn(char* message)
-#
-# show a warning message and do NOT log it
+# {{{ Rip off the ewarn code from /sbin/functions.sh
+WARN=$'\e[33;01m'
+NORMAL=$'\e[0m'
ewarn() {
- if [ "${RC_QUIET_STDOUT}" = "yes" ]
- then
- echo " ${*}"
- else
- echo -e " ${WARN}*${NORMAL} ${*}"
- fi
-
+ echo -e " ${WARN}*${NORMAL} $*"
return 0
}
+# }}}
+# {{{ global vars
S_SEPARATOR="--------------------------------------------------------------------------------"
D_SEPARATOR="================================================================================"
@@ -44,43 +41,46 @@ dnscache=0
tinydns=1
axfrdns=2
+# global vars }}}
+
+# {{{ functions
check_group_users()
{
- echo ": Checking for required group (${REQ_GROUP}) :"
- grep ${REQ_GROUP} /etc/group &> /dev/null
- if [ $? -ne 0 ]
- then
+ echo ": Checking for required group (${REQ_GROUP}) :"
+ grep ${REQ_GROUP} /etc/group &> /dev/null
+ if [ $? -ne 0 ]
+ then
ebegin "Adding group ${REQ_GROUP}"
/usr/sbin/groupadd ${REQ_GROUP} &>/dev/null && eend 0 || eend 1
- fi
+ fi
- echo ": Checking for required users (${REQ_USERS}) :"
- for user in ${REQ_USERS};
- do
+ echo ": Checking for required users (${REQ_USERS}) :"
+ for user in ${REQ_USERS};
+ do
grep ${user} /etc/passwd &> /dev/null
if [ $? -ne 0 ]
then
- ebegin "Adding user ${user}"
- /usr/sbin/useradd -d /dev/null -s /bin/false -g ${REQ_GROUP} ${user} &>/dev/null && eend 0 || eend 1
+ ebegin "Adding user ${user}"
+ /usr/sbin/useradd -d /dev/null -s /bin/false -g ${REQ_GROUP} ${user} &>/dev/null && eend 0 || eend 1
fi
- done
- return 0
+ done
+ return 0
}
start_services()
{
- local services="$1"
-
- echo "${SEPARATOR}"
- echo ": Start services :"
- echo
- echo " Your services (${services// /, }) are ready for startup!"
- echo
- ewarn " The following requires daemontools to be running!"
- local answer=""
- read -p " Would you like ${services// /, } to be started and supervised by daemontools now? [Y|n]> " answer
- if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
- then
+ local services="$1"
+
+ echo "${SEPARATOR}"
+ echo ": Start services :"
+ echo
+ echo " Your services (${services// /, }) are ready for startup!"
+ echo
+ ewarn " The following requires daemontools to be running!"
+ local answer=""
+ read -p " Would you like ${services// /, } to be started and supervised by daemontools now? [Y|n]> " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
ebegin "Checking if daemontools are running"
ps -A |grep svscanboot &>/dev/null && eend 0 || eend 1
@@ -91,10 +91,10 @@ start_services()
local fixedroot_path=`echo ${mypath} | sed -e 's#^/#../#'`
for service in ${services};
do
- for ip in ${IPs[${service}]};
- do
+ for ip in ${IPs[${service}]};
+ do
ln -sf ${fixedroot_path}/${service}/${ip} /service/${service}_${ip}
- done
+ done
done
eend 0
@@ -110,18 +110,18 @@ start_services()
echo
for service in ${services};
do
- for ip in ${IPs[${service}]};
- do
+ for ip in ${IPs[${service}]};
+ do
svstat /service/${service}_${ip} /service/${service}_${ip}/log
- done
+ done
done
- fi
- return 0
+ fi
+ return 0
}
tinydns_setup()
{
- return 0
+ return 0
}
axfrdns_setup()
@@ -131,7 +131,7 @@ axfrdns_setup()
echo
TCPRULES_DIR="${mypath}/axfrdns/${myip}/control"
echo " axfrdns is accessed by your secondary servers and when response cannot fit UDP packet"
- echo " You have to specify their which IP addresses are allowed to access it"
+ echo " You have to specify which IP addresses are allowed to access it"
echo " in ${TCPRULES_DIR}/tcp.axfrdns"
echo
echo " Example:"
@@ -145,24 +145,24 @@ axfrdns_setup()
sed -i -e "s#-x tcp.cdb#-x control/tcp.axfrdns.cdb#g" ${mypath}/axfrdns/${myip}/run
if [ -e ${TCPRULES_DIR}/tcp.axfrdns ]
then
- ewarn "${TCPRULES_DIR}/tcp.axfrdns exists."
- read -p " Do you want it cleared? [Y|n]: " answer
- if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
- then
+ ewarn "${TCPRULES_DIR}/tcp.axfrdns exists."
+ read -p " Do you want it cleared? [y|N]: " answer
+ if [ "${answer}" == "y" ]
+ then
echo '# sample line: 1.2.3.4:allow,AXFR="heaven.af.mil/3.2.1.in-addr.arpa"' > ${TCPRULES_DIR}/tcp.axfrdns
- fi
+ fi
fi
read -p " IP to allow (press Enter to end)> " ipallow
while [ "$ipallow" != "" ]
do
- echo "${ipallow}:allow" >> ${TCPRULES_DIR}/tcp.axfrdns
- read -p " IP to allow (press Enter to end)> " ipallow
+ echo "${ipallow}:allow" >> ${TCPRULES_DIR}/tcp.axfrdns
+ read -p " IP to allow (press Enter to end)> " ipallow
done
echo ":deny" >> ${TCPRULES_DIR}/tcp.axfrdns
- echo " Here is the tcprules file created so far:"
+ echo " Here are the tcprules created so far:"
echo
cat ${TCPRULES_DIR}/tcp.axfrdns
echo
@@ -170,8 +170,8 @@ axfrdns_setup()
read -p " Would you like ${TCPRULES_DIR}/tcp.axfrdns.cdb updated? [Y|n]: " answer
if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
then
- ebegin "Updating ${TCPRULES_DIR}/tcp.axfrdns.cdb"
- bash -c "cd ${TCPRULES_DIR} && make" && eend 0 || eend 1
+ ebegin "Updating ${TCPRULES_DIR}/tcp.axfrdns.cdb"
+ bash -c "cd ${TCPRULES_DIR} && make" && eend 0 || eend 1
fi
return 0
}
@@ -180,10 +180,11 @@ dnscache_setup()
{
echo ": Configure forwarding :"
echo
- echo " dnscache can be configured to forward queries to another DNS cache"
- echo " (such as the one your ISP provides) rather than perform the lookups itself."
+ echo " dnscache can be configured to forward queries to another"
+ echo " DNS cache (such as the one your ISP provides) rather than"
+ echo " performing the lookups itself."
echo
- echo " To enable this forwarding-only mode (a good idea most of the time),"
+ echo " To enable this forwarding-only mode (usually a good idea),"
echo " provide the IPs of the caches to forward to."
echo " To have dnscache perform the lookups itself, just press Enter."
echo
@@ -191,42 +192,43 @@ dnscache_setup()
echo
if [ "$myforward" != "" ]
then
- echo $myforward > ${mypath}/dnscache/${myip}/root/servers/\@
- echo -n "1" > ${mypath}/dnscache/${myip}/env/FORWARDONLY
+ echo $myforward > ${mypath}/dnscache/${myip}/root/servers/\@
+ echo -n "1" > ${mypath}/dnscache/${myip}/env/FORWARDONLY
- read -p " forward-to IP (press Enter to end)> " myforward
- while [ "$myforward" != "" ]
- do
+ read -p " forward-to IP (press Enter to end)> " myforward
+ while [ "$myforward" != "" ]
+ do
echo $myforward >> ${mypath}/dnscache/${myip}/root/servers/\@
read -p " forward-to IP (press Enter to end)> " myforward
- done
+ done
- echo
- echo " Currently all queries will be forwarded to:"
- echo
- cat ${mypath}/dnscache/${myip}/root/servers/\@
- echo
+ echo
+ echo " Currently all queries will be forwarded to:"
+ echo
+ cat ${mypath}/dnscache/${myip}/root/servers/\@
+ echo
fi
echo "${SEPARATOR}"
echo ": Configuring clients :"
echo
- echo " By default dnscache allows only localhost (127.0.0.1) to access it."
- echo " You have to specify the IP addresses of the clients that shall be allowed to use it."
+ echo " By default dnscache allows only localhost (127.0.0.1) to"
+ echo " access it. You have to specify the IP addresses of the"
+ echo " clients that shall be allowed to use it."
echo
echo " Example:"
- echo " 1.2.3.4 would allow only the host 1.2.3.4"
- echo " 1.2.3 would allow all hosts 1.2.3.x (like 1.2.3.4, 1.2.3.100, etc.)"
+ echo " 1.2.3.4 would allow only one host: 1.2.3.4"
+ echo " 1.2.3 would allow all hosts 1.2.3.0/24 (e.g. 1.2.3.4, 1.2.3.100, etc.)"
echo
- echo " Press Enter if you do not want to allow external clients!"
+ echo " Press Enter if you do NOT want to allow external clients!"
echo
read -p " Allowed IP> " myclientip
while [ "$myclientip" != "" ]
do
- touch ${mypath}/dnscache/${myip}/root/ip/${myclientip}
- read -p " Allowed IP (press Enter to end)> " myclientip
+ touch ${mypath}/dnscache/${myip}/root/ip/${myclientip}
+ read -p " Allowed IP (press Enter to end)> " myclientip
done
echo
@@ -245,174 +247,175 @@ dnscache_setup()
common_setup()
{
- local service_human="$1"
- local service_machine="$2"
- local services="$3"
+ local service_human="$1"
+ local service_machine="$2"
+ local services="$3"
- echo ": ${service_human} setup :"
- echo
+ echo ": ${service_human} setup :"
+ echo
- for service in ${services};
- do
+ for service in ${services};
+ do
if [ ! -e ${mypath}/${service} ]
then
- ebegin "Creating ${mypath}/${service}"
- mkdir -p $mypath/${service} && eend 0 || eend 1
+ ebegin "Creating ${mypath}/${service}"
+ mkdir -p $mypath/${service} && eend 0 || eend 1
fi
- done
-
- echo "${SEPARATOR}"
- echo ": IP address to bind to :"
- echo
- echo " Specify an address to which the ${service_human} should bind."
- echo " Currently accessible IPs:"
- local addrs=`ifconfig -a | grep "inet addr" | cut -f2 -d":" | cut -f1 -d" "`
- echo " "$addrs
- echo
-
- while [ "${myip}" == "" ]
- do
+ done
+
+ echo "${SEPARATOR}"
+ echo ": IP address to bind to :"
+ echo
+ echo " Specify an address to which the ${service_human} should bind."
+ echo " Currently accessible IPs:"
+ local addrs=`ifconfig -a | grep "inet addr" | cut -f2 -d":" | cut -f1 -d" "`
+ echo " "$addrs
+ echo
+
+ while [ "${myip}" == "" ]
+ do
read -p " IP to bind to> " myip
- done
- echo
+ done
+ echo
- for service in ${services};
- do
+ for service in ${services};
+ do
IPs[${service}]="${IPs[${service}]} ${myip}"
- done
+ done
- local dnscache_INSTALL="/usr/bin/dnscache-conf dnscache dnslog ${mypath}/dnscache/${myip} $myip"
- local tinydns_INSTALL="/usr/bin/tinydns-conf tinydns dnslog ${mypath}/tinydns/${myip} $myip"
- local axfrdns_INSTALL="\
+ local dnscache_INSTALL="/usr/bin/dnscache-conf dnscache dnslog ${mypath}/dnscache/${myip} $myip"
+ local tinydns_INSTALL="/usr/bin/tinydns-conf tinydns dnslog ${mypath}/tinydns/${myip} $myip"
+ local axfrdns_INSTALL="\
/usr/bin/axfrdns-conf tinydns dnslog ${mypath}/axfrdns/${myip} ${mypath}/tinydns/${myip} $myip &&\
mkdir -p ${mypath}/axfrdns/${myip}/control &&\
echo -e \"tcp.axfrdns.cdb:\ttcp.axfrdns\n\ttcprules tcp.axfrdns.cdb .tcp.axfrdns.cdb.tmp < tcp.axfrdns\" > ${mypath}/axfrdns/${myip}/control/Makefile &&\
rm -f ${mypath}/axfrdns/${myip}/tcp ${mypath}/axfrdns/${myip}/Makefile"
- for service in ${services};
- do
+ for service in ${services};
+ do
if [ ! -e ${mypath}/${service}/${myip} ]
then
- ebegin "Setting up ${service} in ${mypath}/${service}/${myip}"
- eval command=\$${service}_INSTALL
- /bin/bash -c "${command}" && eend 0 || eend 1
+ ebegin "Setting up ${service} in ${mypath}/${service}/${myip}"
+ eval command=\$${service}_INSTALL
+ /bin/bash -c "${command}" && eend 0 || eend 1
else
- ewarn "${service} directory ${mypath}/${service}/${myip} exists, nothing done."
+ ewarn "${service} directory ${mypath}/${service}/${myip} exists, nothing done."
fi
- done
+ done
}
+# functions }}}
-
-
-
+# {{{ main script
if [ `id -u` -ne 0 ]
then
- eerror "${0}: You must be root."
+ ewarn "You must be root to run this script, sorry."
exit 1
else
- echo "${D_SEPARATOR}"
- echo ": DJB DNS setup :"
- echo
- echo " This script will help you setup the following:"
- echo
- echo " DNS server(s): to publish addresses of Internet hosts"
- echo
- echo " DNS cache(s) : to find addresses of Internet hosts"
- echo
- echo " For further information see:"
- echo " http://cr.yp.to/djbdns/blurb/overview.html"
- echo
- ewarn "If you have already setup your services,"
- ewarn "either exit now, or setup in different directories."
- echo
-
- answer=""
- read -p " Would you like to continue with setup? [Y|n]> " answer
- if [ "${answer}" == "n" ] || [ "${answer}" == "N" ]
- then
+ echo "${D_SEPARATOR}"
+ echo ": DJB DNS setup :"
+ echo
+ echo " This script will help you setup the following:"
+ echo
+ echo " DNS server(s): to publish addresses of Internet hosts"
+ echo
+ echo " DNS cache(s) : to find addresses of Internet hosts"
+ echo
+ echo " For further information see:"
+ echo " http://cr.yp.to/djbdns/blurb/overview.html"
+ echo
+ ewarn "If you have already setup your services,"
+ ewarn "either exit now, or setup in different directories."
+ echo
+
+ answer=""
+ read -p " Would you like to continue with setup? [Y|n]> " answer
+ if [ "${answer}" == "n" ] || [ "${answer}" == "N" ]
+ then
ewarn "Aborting setup"
exit 1
- fi
-
- echo "${D_SEPARATOR}"
- echo ": Choose install location :"
- echo
- default_path="/var"
- echo " The default (${default_path}) will install them"
- echo " in ${default_path}/\${service}/\${IP_ADDRESS}"
- echo
- echo " For example:"
- echo " /var/tinydns /1.2.3.4"
- echo " /192.168.33.1"
- echo " /axfrdns /1.2.3.4"
- echo " /192.168.33.1"
- echo " /dnscache/127.0.0.1"
- echo
- ewarn "Do NOT enter trailing slash"
- echo " Where do you want services installed?"
- read -p "[${default_path}] > " mypath
- echo
-
- if [ "${mypath}" == "" ]
- then
+ fi
+
+ echo "${D_SEPARATOR}"
+ echo ": Choose install location :"
+ echo
+ default_path="/var"
+ echo " The default (${default_path}) will install them"
+ echo " in ${default_path}/\${service}/\${IP_ADDRESS}"
+ echo
+ echo " For example:"
+ echo " /var/tinydns /1.2.3.4"
+ echo " /192.168.33.1"
+ echo " /axfrdns /1.2.3.4"
+ echo " /192.168.33.1"
+ echo " /dnscache/127.0.0.1"
+ echo
+ ewarn "Do NOT enter trailing slash"
+ echo " Where do you want services installed?"
+ read -p "[${default_path}] > " mypath
+ echo
+
+ if [ "${mypath}" == "" ]
+ then
mypath=${default_path}
- fi
+ fi
- echo "${D_SEPARATOR}"
- check_group_users
+ echo "${D_SEPARATOR}"
+ check_group_users
- answer=""
- another=""
- until [ "$answer" == "n" ]
- do
+ answer=""
+ another=""
+ until [ "$answer" == "n" ]
+ do
echo "${D_SEPARATOR}"
answer=""
read -p " Would you like to setup ${another}dnscache? [Y|n]> " answer
if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
then
- myip=""
- echo "${S_SEPARATOR}"
- common_setup "DNS cache" "dnscache" "dnscache"
- if [ $? == 0 ]
- then
+ myip=""
+ echo "${S_SEPARATOR}"
+ common_setup "DNS cache" "dnscache" "dnscache"
+ if [ $? == 0 ]
+ then
dnscache_setup
- else
+ else
ewarn "Skipping dnscache specific setup."
- fi
+ fi
fi
another="another "
- done
+ done
- answer=""
- another=""
- until [ "$answer" == "n" ]
- do
+ answer=""
+ another=""
+ until [ "$answer" == "n" ]
+ do
echo "${D_SEPARATOR}"
answer=""
read -p " Would you like to setup ${another}DNS server? [Y|n]> " answer
if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
then
- myip=""
- echo "${S_SEPARATOR}"
- common_setup "DNS server" "{tinydns,afxrdns}" "tinydns axfrdns"
- if [ $? == 0 ]
- then
+ myip=""
+ echo "${S_SEPARATOR}"
+ common_setup "DNS server" "{tinydns,afxrdns}" "tinydns axfrdns"
+ if [ $? == 0 ]
+ then
tinydns_setup
axfrdns_setup
- else
+ else
ewarn "Skipping tinydns and axfrdns specific setup."
- fi
+ fi
fi
another="another "
- done
+ done
- echo "${D_SEPARATOR}"
+ echo "${D_SEPARATOR}"
- start_services "tinydns axfrdns dnscache"
-
- echo "${D_SEPARATOR}"
+ start_services "tinydns axfrdns dnscache"
+
+ echo "${D_SEPARATOR}"
fi
+# main script }}}
+# vim: set ts=4 fenc=utf-8 foldmethod=marker: