]> git.pld-linux.org Git - packages/pdnsd.git/commitdiff
- pdnsd is fucked up, here comes the horrible workaround.
authorTomasz Pala <gotar@pld-linux.org>
Wed, 19 Jun 2002 08:38:02 +0000 (08:38 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pdnsd.init -> 1.7

pdnsd.init

index a0df08c04bfdf40c161efc968d2b83053c0e3214..d5c65a856f604a28c8ec8eaa547ec6b7b44ed289 100644 (file)
@@ -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
This page took 0.081907 seconds and 4 git commands to generate.