fix bugs 163598, 163409

This commit is contained in:
jvdias 2005-07-19 15:40:15 +00:00
parent 1ccce37de0
commit aad9089220

View File

@ -92,6 +92,7 @@ start() {
daemon /usr/sbin/$PROG -u named ${OPTIONS}; daemon /usr/sbin/$PROG -u named ${OPTIONS};
RETVAL=$?; RETVAL=$?;
if [ $RETVAL -eq 0 ]; then if [ $RETVAL -eq 0 ]; then
rm -f /var/run/named.pid
ln -s $ROOTDIR/var/run/named/named.pid /var/run/named.pid; ln -s $ROOTDIR/var/run/named/named.pid /var/run/named.pid;
fi; fi;
else else
@ -113,13 +114,13 @@ start() {
stop() { stop() {
# Stop daemons. # Stop daemons.
echo -n $"Stopping $prog: " echo -n $"Stopping $prog: "
/usr/sbin/rndc stop >/dev/null 2>&1 || pidof named >/dev/null && killproc named -TERM >/dev/null 2>&1 /usr/sbin/rndc stop >/dev/null 2>&1
RETVAL=$? RETVAL=$?
if [ $RETVAL -eq 0 ]; then if [ $RETVAL -eq 0 ]; then
rm -f /var/lock/subsys/named rm -f /var/lock/subsys/named
rm -f /var/run/named.pid rm -f /var/run/named.pid
elif pidof named >/dev/null; then elif pidof named >/dev/null; then
/usr/sbin/rndc stop >/dev/null 2>&1 || pidof named >/dev/null && killproc named -TERM >/dev/null 2>&1 killproc named -TERM >/dev/null 2>&1
RETVAL=$? RETVAL=$?
if [ $RETVAL -eq 0 ]; then if [ $RETVAL -eq 0 ]; then
rm -f /var/lock/subsys/named rm -f /var/lock/subsys/named
@ -150,7 +151,7 @@ reload() {
p=`/sbin/pidof -o %PPID named` p=`/sbin/pidof -o %PPID named`
RETVAL=$? RETVAL=$?
if [ "$RETVAL" -eq 0 ]; then if [ "$RETVAL" -eq 0 ]; then
/usr/sbin/rndc reload >/dev/null 2>&1 || /usr/bin/kill -HUP $p; /usr/sbin/rndc reload >/dev/null 2>&1 || /bin/kill -HUP $p;
RETVAL=$? RETVAL=$?
fi fi
[ "$RETVAL" -eq 0 ] && success $"$prog reload" || failure $"$prog reload" [ "$RETVAL" -eq 0 ] && success $"$prog reload" || failure $"$prog reload"