diff options
Diffstat (limited to 'named.init')
| -rwxr-xr-x | named.init | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -19,7 +19,7 @@ [ -r /etc/sysconfig/named ] && . /etc/sysconfig/named -# Don't kill named dunring clean-up +# Don't kill named during clean-up NAMED_SHUTDOWN_TIMEOUT=${NAMED_SHUTDOWN_TIMEOUT:-100} if [ -n "$ROOTDIR" ]; then @@ -107,7 +107,7 @@ start() { mkdir -p ${ROOTDIR}/proc fi if ! egrep -q '^/proc[[:space:]]+'${ROOTDIR}'/proc' /proc/mounts; then - mount --bind /proc ${ROOTDIR}/proc >/dev/null 2>&1 + mount --bind -n /proc ${ROOTDIR}/proc >/dev/null 2>&1 fi if [ $dbusEnabled -eq 1 ]; then if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${ROOTDIR}'/var/run/dbus' /proc/mounts; then @@ -115,7 +115,7 @@ start() { if [ ! -d /var/run/dbus ] ; then mkdir -p /var/run/dbus ; fi; - mount --bind /var/run/dbus ${ROOTDIR}/var/run/dbus > /dev/null 2>&1; + mount --bind -n /var/run/dbus ${ROOTDIR}/var/run/dbus > /dev/null 2>&1; fi; fi; fi @@ -196,13 +196,15 @@ stop() { echo -n $"Stopping $named: " /usr/sbin/rndc stop >/dev/null 2>&1 RETVAL=$? - if [ $RETVAL -eq 0 ]; then + # is it still here? + if /sbin/pidof -o %PPID $named >/dev/null; then timeout=0 while : ; do if /sbin/pidof -o %PPID $named >/dev/null; then if [ $timeout -ge $NAMED_SHUTDOWN_TIMEOUT ]; then killproc $named -TERM >/dev/null 2>&1 RETVAL=$? + echo -n $"no response, killing with -TERM " break else sleep 2 && echo -n "." @@ -232,8 +234,6 @@ rhstatus() { } restart() { stop -# wait a couple of seconds for the named to finish closing down - sleep 2 start } reload() { |
