[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#158993: Patch



I believe this patch should fix the problems seen, and abide more closely
by Policy.  Ahem.  If everyone agrees, we can put this in 1.3.28.0.1-1
due out today ...  otherwise look for it in -2.

The second diff is against current debian-apache CVS.
The full diff from 1.3.28-4 to my current tree is a little big to send, but
I'll send some snippets:

@@ -55,13 +61,13 @@ case "$1" in
 
   stop)
     echo -n "Stopping web server: $NAME"
-    start-stop-daemon --stop --pidfile $PIDFILE --oknodo --exec $DAEMON
+    start-stop-daemon --stop --pidfile $PIDFILE --oknodo
     ;;
 
-  reload)
+  reload | force-reload)
     test_config
     echo -n "Reloading $NAME configuration"
-    start-stop-daemon --stop --pidfile $PIDFILE --signal USR1 --exec $DAEMON
+    start-stop-daemon --stop --pidfile $PIDFILE --signal USR1
     ;;
 
   reload-modules)
@@ -73,13 +79,11 @@ case "$1" in
     ;;
 
   restart)
-    $0 reload-modules
-    exit $?
-    ;;
-
-  force-reload)
-    $0 reload-modules
-    exit $?
+    test_config
+    echo -n "Restarting $NAME"
+    if ! start-stop-daemon -q --stop --pidfile $PIDFILE --signal HUP; then
+       start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON
+    fi
     ;;
 
   *)

(now the real diff):

Index: debian/apache.init
===================================================================
RCS file: /var/lib/cvs/debian-apache/debian/apache.init,v
retrieving revision 1.8
diff -u -p -r1.8 apache.init
--- debian/apache.init	28 Oct 2003 12:49:17 -0000	1.8
+++ debian/apache.init	28 Oct 2003 15:42:54 -0000
@@ -51,12 +51,6 @@ should_start() {
     fi
 }
 
-common_restart() {
-    start-stop-daemon --stop --pidfile $PIDFILE --oknodo --retry 30
-    should_start
-    start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON
-}
-
 case "$1" in
   start)
     should_start
@@ -70,7 +64,7 @@ case "$1" in
     start-stop-daemon --stop --pidfile $PIDFILE --oknodo
     ;;
 
-  reload)
+  reload | force-reload)
     test_config
     echo -n "Reloading $NAME configuration"
     start-stop-daemon --stop --pidfile $PIDFILE --signal USR1
@@ -79,13 +73,17 @@ case "$1" in
   reload-modules)
     test_config
     echo -n "Reloading $NAME modules"
-    common_restart
+    start-stop-daemon --stop --pidfile $PIDFILE --oknodo --retry 30
+    should_start
+    start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON
     ;;
 
-  restart | force-reload)
+  restart)
     test_config
     echo -n "Restarting $NAME"
-    common_restart
+    if ! start-stop-daemon -q --stop --pidfile $PIDFILE --signal HUP; then
+	start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON
+    fi
     ;;
 
   *)

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk



Reply to: