fix bugs: 157601, 156797, 154335
This commit is contained in:
parent
b7b41adc31
commit
6e144cb21b
10
named.init
10
named.init
@ -28,11 +28,13 @@ prog="named"
|
|||||||
|
|
||||||
start() {
|
start() {
|
||||||
# Start daemons.
|
# Start daemons.
|
||||||
|
echo -n $"Starting $prog: "
|
||||||
if [ -n "`/sbin/pidof named`" ]; then
|
if [ -n "`/sbin/pidof named`" ]; then
|
||||||
echo -n $"$prog: already running"
|
echo -n $"$prog: already running"
|
||||||
|
failure
|
||||||
|
echo
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo -n $"Starting $prog: "
|
|
||||||
ckcf_options='-z'; # enable named-checkzone for each zone (9.3.1+) !
|
ckcf_options='-z'; # enable named-checkzone for each zone (9.3.1+) !
|
||||||
if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
|
if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
|
||||||
OPTIONS="${OPTIONS} -t ${ROOTDIR}"
|
OPTIONS="${OPTIONS} -t ${ROOTDIR}"
|
||||||
@ -111,13 +113,13 @@ start() {
|
|||||||
stop() {
|
stop() {
|
||||||
# Stop daemons.
|
# Stop daemons.
|
||||||
echo -n $"Stopping $prog: "
|
echo -n $"Stopping $prog: "
|
||||||
/usr/sbin/rndc stop || killproc named -TERM >/dev/null 2>&1
|
/usr/sbin/rndc stop >/dev/null 2>&1 || pidof named >/dev/null && 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
|
||||||
rm -f /var/run/named.pid
|
rm -f /var/run/named.pid
|
||||||
else
|
elif pidof named >/dev/null; then
|
||||||
/usr/sbin/rndc stop || killproc named -TERM >/dev/null 2>&1
|
/usr/sbin/rndc stop >/dev/null 2>&1 || pidof named >/dev/null && 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
|
||||||
|
Loading…
Reference in New Issue
Block a user