SVN: rc-scripts/trunk/rc.d/init.d/sys-chroots
glen
glen at pld-linux.org
Thu Dec 7 22:38:28 CET 2006
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
More information about the pld-cvs-commit
mailing list