Package: squid3
Version: 3.0.STABLE13-1
Severity: wishlist
Tags: patch
File: /etc/init.d/squid3

See comments in the dpkg source, it does the same thing internally
with greater efficiency.  On our proxy squid restarts in 5 seconds now
instead of 25.

--- /etc/init.d/squid3
+++ /tmp/tmp.U14159/squid3      2009-03-26 08:01:43.000000000 -0700
@@ -77,32 +77,8 @@
 }
 
 stop () {
-       PID=`cat $PIDFILE 2>/dev/null`
-       start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON
-       #
-       #       Now we have to wait until squid has _really_ stopped.
-       #
-       sleep 2
-       if test -n "$PID" && kill -0 $PID 2>/dev/null
-       then
-               log_action_begin_msg " Waiting"
-               cnt=0
-               while kill -0 $PID 2>/dev/null
-               do
-                       cnt=`expr $cnt + 1`
-                       if [ $cnt -gt 24 ]
-                       then
-                               log_action_end_msg 1
-                               return 1
-                       fi
-                       sleep 5
-                       log_action_cont_msg ""
-               done
-               log_action_end_msg 0
-               return 0
-       else
-               return 0
-       fi
+       start-stop-daemon --stop --quiet --retry 5 --pidfile "$PIDFILE" --exec 
$DAEMON
+       return 0
 }
 
 case "$1" in



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to