diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-08-28 13:14:59 +0400 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-08-28 13:14:59 +0400 |
commit | 81d66209af438f8d588530fc745f1eee7a404693 (patch) | |
tree | 394d70ad886b34e8f57b6f54998aa8ba6a0f127d /main/djbdns/dnscache.initd | |
parent | 8ec9e588268147772b6c825ae3a92967caa99c6b (diff) | |
download | aports-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/djbdns/dnscache.initd')
-rwxr-xr-x | main/djbdns/dnscache.initd | 8 |
1 files changed, 6 insertions, 2 deletions
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 $? } |