Author: glen
Date: Thu Dec  7 22:38:28 2006
New Revision: 8080

Modified:
   rc-scripts/trunk/rc.d/init.d/sys-chroots
Log:
Optimize for faster exit if not configured.

Modified: rc-scripts/trunk/rc.d/init.d/sys-chroots
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/sys-chroots    (original)
+++ rc-scripts/trunk/rc.d/init.d/sys-chroots    Thu Dec  7 22:38:28 2006
@@ -1,19 +1,22 @@
 #!/bin/sh
 #
-# sys-chroots  This shell scripts starts and stops services in chroots
+# sys-chroots  Starts and stops services in chroots
 #
-# chkconfig:   2345 99 1
-# description: This shell scripts starts and stops services in chroots
+# chkconfig:   2345 99 01
+# description: This shell script starts and stops services in chroots
 
-# Source function library.
-. /etc/rc.d/init.d/functions
+[ -r /etc/sysconfig/system ] && . /etc/sysconfig/system
+[ -n "$2" ] && SYSTEM_CHROOTS="$2"
 
-# Source networking configuration.
-. /etc/sysconfig/network
+if [ -z "$SYSTEM_CHROOTS" ]; then
+       case "$1" in
+       start|stop|restart)
+               exit 0
+               ;;
+       esac
+fi
 
-[ -z "$SYSTEM_CHROOTS" ] && exit 0
-[ -n "$1" ] && CMD="$1"
-[ -n "$2" ] && SYSTEM_CHROOTS="$2"
+CMD="$1"
 
 set $(/sbin/runlevel)
 runlevel=$2
@@ -22,6 +25,9 @@
 
 [ -z "$runlevel" -o -z "$previous" -o "$runlevel" = "$previous" ] && exit 0
 
+# Source function library.
+. /etc/rc.d/init.d/functions
+
 start() {
        if [ "$previous" = "N" ]; then
                runlevel=5
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to