# named This shell script takes care of starting and stopping
# named (BIND DNS server).
#
-# chkconfig: 345 14 89
+# chkconfig: 345 11 89
#
# description: named (BIND) is a Domain Name Server (DNS) \
# that is used to resolve host names to IP addresses.
# Check if the service is already running?
if [ ! -f /var/lock/subsys/named ]; then
msg_starting "Named"
- [ -f /etc/localtime ] && cp -a /etc/localtime $CHROOT_TO_DIR/etc/localtime
+ modprobe -s capability > /dev/null 2>&1
+ [ -f /etc/localtime ] && cp -puL /etc/localtime $CHROOT_TO_DIR/etc/localtime
touch $CHROOT_TO_DIR/named.log && \
chown named:named $CHROOT_TO_DIR/named.log
- daemon named -u named -t $CHROOT_TO_DIR \
- -c /etc/named.conf $NAMED_OPT </dev/null
+ daemon --pidfile $CHROOT_TO_DIR/named.pid /usr/sbin/named -u named \
+ -t $CHROOT_TO_DIR -c /etc/named.conf $NAMED_OPT </dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/named
else
stop() {
if [ -f /var/lock/subsys/named ]; then
msg_stopping "Named"
- killproc named
+ killproc --pidfile $CHROOT_TO_DIR/named.pid named
rm -f /var/lock/subsys/named >/dev/null 2>&1
else
msg_not_running "Named"
# See how we were called.
case "$1" in
start)
- start
+ start
;;
stop)
- stop
+ stop
;;
status)
status named