aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-28 13:14:59 +0400
committerTimo Teras <timo.teras@iki.fi>2009-08-28 13:14:59 +0400
commit81d66209af438f8d588530fc745f1eee7a404693 (patch)
tree394d70ad886b34e8f57b6f54998aa8ba6a0f127d /main
parent8ec9e588268147772b6c825ae3a92967caa99c6b (diff)
downloadaports-81d66209af438f8d588530fc745f1eee7a404693.tar.bz2
aports-81d66209af438f8d588530fc745f1eee7a404693.tar.xz
main/djbdns: fix dnscache init script
to not set uncoditionally FORWARDONLY. just the mere existance of the env variable changes dnscache behaviour. fixes #147.
Diffstat (limited to 'main')
-rw-r--r--main/djbdns/APKBUILD4
-rwxr-xr-xmain/djbdns/dnscache.initd8
2 files changed, 8 insertions, 4 deletions
diff --git a/main/djbdns/APKBUILD b/main/djbdns/APKBUILD
index 4e6e7f40c6..5210cb2a21 100644
--- a/main/djbdns/APKBUILD
+++ b/main/djbdns/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=djbdns
pkgver=1.05
-pkgrel=29
+pkgrel=30
pkgdesc="Excellent high-performance DNS services"
url="http://cr.yp.to/djbdns.html"
license="public-domain"
@@ -82,5 +82,5 @@ c7be73fe2fb4ae02d5096fa2c1f55a68 1.05-errno.patch
acf2f1689e299320d6670c491f4d4e97 tinydns.initd
7dcf6674c07d46c736b3c25d9c92384a tinydns.confd
e09c3a6ba6917e16f4736ab5c070dbe9 dnscache.pre-install
-62a12c34fdc6a184a14b206581fa8184 dnscache.initd
+745220591c11b27cf20df0509e2ae9c8 dnscache.initd
e2938593277d7a87806e70e145a90c3f dnscache.confd"
diff --git a/main/djbdns/dnscache.initd b/main/djbdns/dnscache.initd
index 486f37ef32..d7415da0f4 100755
--- a/main/djbdns/dnscache.initd
+++ b/main/djbdns/dnscache.initd
@@ -24,11 +24,15 @@ start() {
eend 1 "dnscache user or group missing"
return 1
fi
+
+ OPTS=""
+ [ "$FORWARDONLY" ] && OPTS="$OPTS --env FORWARDONLY=$FORWARDONLY"
+ [ "$HIDETTL" ] && OPTS="$OPTS --env HIDETTL=$HIDETTL"
+ [ "$CACHESIZE" ] && OPTS="$OPTS --env CACHESIZE=$CACHESIZE"
start-stop-daemon --start --env "UID=$UID" --env "GID=$GID" \
--env "ROOT=$ROOT" --env "IP=$IP" --env "IPSEND=$IPSEND" \
- --env "HIDETTL=$HIDETTL" --env "CACHESIZE=$CACHESIZE" \
- --env "FORWARDONLY=$FORWARDONLY" --pidfile $PIDFILE \
+ $OPTS --pidfile $PIDFILE \
--background --make-pidfile --exec $DAEMON -- < /dev/urandom
eend $?
}