How to correctly invoke BIND from init.d ?
Ralf Hildebrandt
R.Hildebrandt at tu-bs.de
Mon Oct 11 14:40:03 UTC 1999
Hi!
Since I've migrated from BIND-4.9.7 to 8.2.2 b4, I'd like to know the
correct way of invoking named at boottime.
Right now /sbin/init.d/named is being invoked.
This script uses:
for starting:
if [ "$NAMED" -eq 1 -a -x /usr/sbin/named ]; then
/usr/sbin/named $NAMED_ARGS && echo "named \c"
# shouldn't I rather use ndc ??
set_return
if [ $rval -ne 0 ]; then
echo "Error in starting named. Recommend checking the"
echo "syslog file (usually /var/adm/syslog/syslog.log)"
echo "for possible reasons."
fi
else
if [ ! -x /usr/sbin/named ]; then
echo "/usr/sbin/named is not executable"
rval=1
else
rval=2
fi
fi
;;
'stop')
# shouldn't I rather use ndc stop ??
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi
#
# Determine PID of process(es) to stop
#
if [ "$NAMED" -ne 1 ]; then
rval=2
else
if [ -r /var/run/named.pid ]; then
if kill `cat /var/run/named.pid` ; then
rm /var/run/named.pid
echo "named stopped"
else
rval=1
echo "Unable to stop named"
fi
else
rval=1
echo "Unable to stop named (no pid file)"
fi
fi
;;
*)
echo "usage: $0 {start|stop}"
rval=1
;;
esac
exit $rval
--
Ralf Hildebrandt <R.Hildebrandt at tu-bs.de> www.stahl.bau.tu-bs.de/~hildeb
Failure is not an option.
It comes bundled with your Microsoft product.
-- Attached file included as plaintext by Listar --
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: Ow9T/FD0SrucL3Kr1tP4f3pwUnZzNRoR
iQCVAwUBOAH2wknh/jPvZzKNAQHfzwP+L0jqGki8TLw50F/tE89BKJkpHWEVlc53
1XkGjv8lXInyHrmcYZPmuN5BZNhgXpqLinqwqLTqfh27NS9akiL44OzpLUrGdbsg
JWMtU7QiTwYxw5EdnqcTBBJoaSl6EgM/s112e+wBqpIZP4nl2fcZmX3YzNahDEuI
Hoo6HaZFQn0=
=uWBC
-----END PGP SIGNATURE-----
More information about the bind-users
mailing list