SOURCES: squid.init - check for squid.pid not whole process tree
glen
glen at pld-linux.org
Fri Nov 23 13:57:56 CET 2007
Author: glen Date: Fri Nov 23 12:57:56 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- check for squid.pid not whole process tree
---- Files affected:
SOURCES:
squid.init (1.48 -> 1.49)
---- Diffs:
================================================================
Index: SOURCES/squid.init
diff -u SOURCES/squid.init:1.48 SOURCES/squid.init:1.49
--- SOURCES/squid.init:1.48 Fri Nov 23 13:44:42 2007
+++ SOURCES/squid.init Fri Nov 23 13:57:51 2007
@@ -88,30 +88,25 @@
if [ -f /var/lock/subsys/squid ]; then
# Stop daemons.
msg_stopping Squid
- if [ -f /var/run/squid.pid ]; then
- PID=$(filter_chroot $(cat /var/run/squid.pid))
- if [ -z "$PID" ]; then
- PID=0
- fi
- else
- PID=0
- fi
killproc squid
- RETVAL=$?
- if [ $PID != 0 ]; then
+
+ if [ -f /var/run/squid.pid ]; then
show "Waiting for Squid to stop"
busy
+
timeout=0
- while ps -U squid -o user | grep -q ^squid
- do
+ while : ; do
+ [ ! -f /var/run/squid.pid ] || break
if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then
- break
+ RETVAL=1
+ break
fi
- sleep 1
- timeout=$((timeout + 1))
+ sleep 1 && echo -n "."
+ timeout=$((timeout+1))
done
ok
fi
+
rm -f /var/lock/subsys/squid >/dev/null 2>&1
else
msg_not_running Squid
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/squid.init?r1=1.48&r2=1.49&f=u
More information about the pld-cvs-commit
mailing list