Author: hawk                         Date: Thu Oct 20 21:34:07 2005 GMT
Module: SOURCES                       Tag: RA-branch
---- Log message:
- merged changes from HEAD

---- Files affected:
SOURCES:
   squid.init (1.35.2.3 -> 1.35.2.3.2.1) 

---- Diffs:

================================================================
Index: SOURCES/squid.init
diff -u SOURCES/squid.init:1.35.2.3 SOURCES/squid.init:1.35.2.3.2.1
--- SOURCES/squid.init:1.35.2.3 Tue Aug 24 12:38:12 2004
+++ SOURCES/squid.init  Thu Oct 20 23:34:02 2005
@@ -41,6 +41,9 @@
 # Get service config
 [ -f /etc/sysconfig/squid ] && . /etc/sysconfig/squid
 
+# Set default shutdown timeout if it is not set in service config
+SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-60}
+
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
        if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status -a 
"$1" != init ]; then
@@ -61,6 +64,7 @@
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/squid ]; then
                msg_starting Squid
+               ulimit -n 8192
                daemon $SERVICE_RUN_NICE_LEVEL squid $SQUID_OPTS
                RETVAL=$?
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/squid
@@ -85,9 +89,14 @@
                if [ ! $PID -eq 0 ]; then
                        show "Waiting for Squid to stop"
                        busy
+                       timeout=0
                        while ps -U squid -o user | grep -q ^squid
                        do
+                               if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; 
then
+                                   break
+                               fi
                                sleep 1
+                               timeout=$((timeout+1))
                        done
                        ok
                fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/squid.init?r1=1.35.2.3&r2=1.35.2.3.2.1&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to