From: Tomasz Pala Date: Wed, 19 Jun 2002 08:38:02 +0000 (+0000) Subject: - pdnsd is fucked up, here comes the horrible workaround. X-Git-Tag: pdnsd-1_1_7a-3~1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=79ef3bdca13bf43c6c11471c82727b5aa6718cdf;p=packages%2Fpdnsd.git - pdnsd is fucked up, here comes the horrible workaround. Changed files: pdnsd.init -> 1.7 --- diff --git a/pdnsd.init b/pdnsd.init index a0df08c..d5c65a8 100644 --- a/pdnsd.init +++ b/pdnsd.init @@ -36,23 +36,37 @@ case "$1" in msg_Already_Running Pdns exit 1 fi - ;; + ;; stop) - # Stop daemons. - # show "Stopping %s service" pdns + # Stop daemons. + # show "Stopping %s service" pdns if [ -f /var/lock/subsys/pdns ]; then - msg_stopping Pdns - killproc pdnsd + +# 1. killproc causes pdnsd not to save cache file on exit. +# The only signals not doing this are 4, 6, 8 and 11. +# These signals terminate this script anyway. +# 2. killproc tries to kill all found processes. In this +# case they are connected and die together, so doing +# this will print errors on screen. + +# msg_stopping Pdns +# killproc pdnsd + + echo "Stopping Pdns service" + rm -f /var/lock/subsys/pdns >/dev/null 2>&1 + + killall -FPE pdnsd + else msg_Not_Running Pdns exit 1 fi - ;; + ;; restart) - $0 stop - $0 start - ;; + echo "Due to a pdnsd bug you must start it manually." + $0 stop + ;; reload) if [ -f /var/lock/subsys/pdns ]; then msg_show Pdns @@ -67,22 +81,22 @@ case "$1" in fi ;; force-reload) - # if program allows reloading without stopping + # if program allows reloading without stopping $0 reload exit $? # or if it doesn't - $0 stop && $0 start + $0 restart exit $? ;; status) status pdnsd exit $? - ;; + ;; *) - # show "Usage: %s {start|stop|status|restart|reload|force-reload}" $0 + # show "Usage: %s {start|stop|status|restart|reload|force-reload}" $0 msg_Usage "$0 {start|stop|status|restart|reload|force-reload}" - exit 1 + exit 1 esac exit $RETVAL