On Fri, 9 Oct 1998, Jeff Myers wrote:
> RedHat 5.1
> Linuxconf 1.12r5
>
> When I use Linuxconf to make changes to the DNS linuxconf does not reload
> the DNS server on exit. I must remember to run "ndc reload". Is this a
> feature or a bug?
This is a flaw in redhat sysv script. I am including a fixed one as an
attachement (place it in /etc/rc.d/init.d/named). Note that this script
rely on a linuxconf fix that appears in early 1.12.
With this script, if any of /etc/named.boot or a zone file is modified, a
restart of the dns will be triggered.
--------------------------
Jacques Gelinas
[EMAIL PROTECTED]
#!/bin/sh
#
# named This shell script takes care of starting and stopping
# named (BIND DNS server).
#
# chkconfig: 345 55 10
# description: named (BIND) is a Domain Name Server (DNS) \
# that is used to resolve host names to IP addresses.
# probe: true
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /usr/sbin/named ] || exit 0
[ -f /etc/named.boot ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting named: "
daemon named
echo
touch /var/lock/subsys/named
;;
stop)
# Stop daemons.
echo -n "Shutting down named: "
killproc named
echo "done"
rm -f /var/lock/subsys/named
;;
status)
status named
exit $?
;;
restart)
named.restart
exit $?
;;
probe)
if [ -x /bin/linuxconf ] ; then
NAMED=""
eval `/bin/linuxconf --hint dnsconf`
if [ "$NAMED" != "" ] ; then
echo $NAMED
fi
fi
;;
*)
echo "Usage: named {start|stop|status|restart}"
exit 1
esac
exit 0