diff options
author | David Anders <dave123@abcsinc.com> | 2006-01-25 20:56:55 +0000 |
---|---|---|
committer | David Anders <dave123@abcsinc.com> | 2006-01-25 20:56:55 +0000 |
commit | e507951611b730e80e405aefcfb74307e107fc8a (patch) | |
tree | 4e66cf80cb57b35035dfbb8a6a244f4971ed3ef9 /package/bind/bind9 | |
parent | 9f9e02025e1b904250d960d01ba9d441f7a4a638 (diff) | |
download | buildroot-novena-e507951611b730e80e405aefcfb74307e107fc8a.tar.gz buildroot-novena-e507951611b730e80e405aefcfb74307e107fc8a.zip |
add new package bind per case 0000507
Diffstat (limited to 'package/bind/bind9')
-rw-r--r-- | package/bind/bind9 | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/package/bind/bind9 b/package/bind/bind9 new file mode 100644 index 000000000..aa07b41a9 --- /dev/null +++ b/package/bind/bind9 @@ -0,0 +1,57 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# for a chrooted server: "-u bind -t /var/lib/named" +OPTIONS="" + +test -x /usr/sbin/rndc || exit 0 + +case "$1" in + start) + echo -n "Starting domain name service: named" + + # dirs under /var/run can go away on reboots. + mkdir -p /var/run/bind/run + chmod 775 /var/run/bind/run + chown root:bind /var/run/bind/run >/dev/null 2>&1 || true + + if [ ! -x /usr/sbin/named ]; then + echo "named binary missing - not starting" + exit 1 + fi + if start-stop-daemon --start --quiet --exec /usr/sbin/named \ + --pidfile /var/run/bind/run/named.pid -- $OPTIONS; then + if [ -x /sbin/resolvconf ] ; then + echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo + fi + fi + echo "." + ;; + + stop) + echo -n "Stopping domain name service: named" + if [ -x /sbin/resolvconf ]; then + /sbin/resolvconf -d lo + fi + /usr/sbin/rndc stop + echo "." + ;; + + reload) + /usr/sbin/rndc reload + ;; + + restart|force-reload) + $0 stop + sleep 2 + $0 start + ;; + + *) + echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 |