SOURCES: vrootdevices.init, vservers-legacy.init, rebootmgr.init, ...

glen glen at pld-linux.org
Tue Apr 29 22:43:42 CEST 2008


Author: glen                         Date: Tue Apr 29 20:43:42 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- cosmetics

---- Files affected:
SOURCES:
   vrootdevices.init (1.4 -> 1.5) , vservers-legacy.init (1.2 -> 1.3) , rebootmgr.init (1.2 -> 1.3) , vprocunhide.init (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SOURCES/vrootdevices.init
diff -u SOURCES/vrootdevices.init:1.4 SOURCES/vrootdevices.init:1.5
--- SOURCES/vrootdevices.init:1.4	Tue Jul  3 20:18:09 2007
+++ SOURCES/vrootdevices.init	Tue Apr 29 22:43:37 2008
@@ -4,6 +4,8 @@
 #
 # chkconfig:	345 97 03
 # description:	Setup vroot devices for use inside vservers
+#
+# $Id$
 
 # Source function library
 . /etc/rc.d/init.d/functions
@@ -71,13 +73,13 @@
   stop)
   	stop
 	;;
-  status)
-	echo "There is no way to tell"
-	;;
   restart|force-reload)
 	stop
 	start
 	;;
+  status)
+	echo "There is no way to tell"
+	;;
   *)
 	msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
 	exit 3

================================================================
Index: SOURCES/vservers-legacy.init
diff -u SOURCES/vservers-legacy.init:1.2 SOURCES/vservers-legacy.init:1.3
--- SOURCES/vservers-legacy.init:1.2	Sun May  8 14:14:07 2005
+++ SOURCES/vservers-legacy.init	Tue Apr 29 22:43:37 2008
@@ -2,6 +2,8 @@
 # chkconfig: 345 98 02
 # description: The vservers service is used to start and stop all
 #              the virtual servers.
+#
+# $Id$
 
 . /etc/init.d/functions
 
@@ -18,8 +20,7 @@
 sortserver(){
 	(
 	cd $__CONFDIR
-	for serv in *.conf
-	do
+	for serv in *.conf; do
 	        test -f "$serv" || continue
 
 		PRIORITY=100
@@ -32,8 +33,7 @@
 
 startservers(){
 	cd $__CONFDIR
-	for name in `sortserver`
-	do
+	for name in $(sortserver); do
 		ONBOOT=
 		. $name.conf
 		if [ "$ONBOOT" = "yes" ] ; then
@@ -49,9 +49,9 @@
 	    show "Starting the virtual servers"
 	    busy
 	    if [ "$BACKGROUND" = "yes" ] ; then
-		startservers >/dev/tty8 </dev/tty8 2>/dev/tty8 &
+			startservers >/dev/tty8 </dev/tty8 2>/dev/tty8 &
 	    else
-		startservers
+			startservers
 	    fi
 	    touch /var/lock/subsys/vservers-legacy
 	    ok
@@ -64,8 +64,8 @@
 	    show "Stopping the virtual servers"
 	    busy
 	    cd $__CONFDIR
-	    for name in `sortserver -r` ; do
-		$_VSERVER_LEGACY $name stop
+	    for name in $(sortserver -r); do
+			$_VSERVER_LEGACY $name stop
 	    done
 	    rm -f /var/lock/subsys/vservers-legacy
 	    ok
@@ -78,25 +78,22 @@
 	$0 start
 	;;
   status)
-  	if [ -f /var/lock/subsys/vservers-legacy ] ; then
+  	if [ -f /var/lock/subsys/vservers-legacy ]; then
 	    cd $__CONFDIR
-	    for serv in *.conf ; do
-		ONBOOT=no
-		name=`basename $serv .conf`
-		. $serv
-		echo -n ONBOOT=$ONBOOT " "
-		$_VSERVER_LEGACY $name running
+	    for serv in *.conf; do
+			ONBOOT=no
+			name=$(basename $serv .conf)
+			. $serv
+			echo -n ONBOOT=$ONBOOT " "
+			$_VSERVER_LEGACY $name running
 	    done
 	else
 	    msg_not_running "virtual servers"
 	fi
 	;;
   *)
-	echo "Usage: vservers {start|stop|restart|status}"
-	exit 1
+	msg_usage "$0 {start|stop|restart|status}"
+	exit 3
 esac
 
 exit $RETVAL
-
-# This must be last line !
-# vi:syntax=sh:tw=78:ts=8:sw=4

================================================================
Index: SOURCES/rebootmgr.init
diff -u SOURCES/rebootmgr.init:1.2 SOURCES/rebootmgr.init:1.3
--- SOURCES/rebootmgr.init:1.2	Sun May  8 14:14:07 2005
+++ SOURCES/rebootmgr.init	Tue Apr 29 22:43:37 2008
@@ -5,6 +5,8 @@
 #              the /sbin/vreboot command to talk with the reboot manager
 # processname: rebootmgr
 # config: /etc/vservers
+#
+# $Id$
 
 . /etc/init.d/functions
 
@@ -17,18 +19,18 @@
 
 # See how we were called.
 case "$1" in
-    start)
-    	if [ ! -f /var/lock/subsys/rebootmgr ] ; then
+  start)
+	if [ ! -f /var/lock/subsys/rebootmgr ] ; then
 	    show "Starting the legacy vserver reboot manager"
 	    busy
 	    cd $__CONFDIR
 	    VSERVERS=
-	    for serv in *.conf ; do
-		[ -f "$serv" ] || continue
-		serv=`basename $serv .conf`
-		if [ -d $__DEFAULT_VSERVERDIR/$serv ] ; then
-		    VSERVERS="$VSERVERS $serv"
-		fi
+	    for serv in *.conf; do
+			[ -f "$serv" ] || continue
+			serv=`basename $serv .conf`
+			if [ -d $__DEFAULT_VSERVERDIR/$serv ] ; then
+				VSERVERS="$VSERVERS $serv"
+			fi
 	    done
 	    $_REBOOTMGR --pidfile /var/run/rebootmgr.pid $VSERVERS &
 	    touch /var/lock/subsys/rebootmgr
@@ -37,37 +39,34 @@
 	    msg_already_running "legacy vserver reboot manager"
 	fi
 	;;
-    stop)
-    	if [ -f /var/lock/subsys/rebootmgr ] ; then
-	    show "Stopping the legacy vserver reboot manager"
-	    busy
-	    kill `cat /var/run/rebootmgr.pid`
-	    rm -f /var/lock/subsys/rebootmgr
-	    rm -f /var/run/rebootmgr.pid
-	    ok
+  stop)
+	if [ -f /var/lock/subsys/rebootmgr ] ; then
+		show "Stopping the legacy vserver reboot manager"
+		busy
+		kill $(cat /var/run/rebootmgr.pid)
+		rm -f /var/lock/subsys/rebootmgr
+		rm -f /var/run/rebootmgr.pid
+		ok
 	else
 	    msg_not_running "legacy vserver reboot manager"
 	fi
 	;;
-    restart)
-     	$0 stop
+  restart)
+	$0 stop
 	$0 start
 	;;
-    status)
-    	if [ -f /var/run/rebootmgr.pid ] ; then
-	    if kill -0 `cat /var/run/rebootmgr.pid` ; then
-		echo rebootmgr is running
+  status)
+	if [ -f /var/run/rebootmgr.pid ] ; then
+	    if kill -0 $(cat /var/run/rebootmgr.pid); then
+			echo rebootmgr is running
 	    else
-		echo rebootmgr is NOT running
+			echo rebootmgr is NOT running
 	    fi
 	fi
 	;;
-    *)
-	echo "Usage: $0 {start|stop|restart|status}"
-	exit 1
+  *)
+	msg_usage "$0 {start|stop|restart|status}"
+	exit 3
 esac
 
 exit 0
-
-# This must be last line !
-# vi:syntax=sh:tw=78:ts=8:sw=4

================================================================
Index: SOURCES/vprocunhide.init
diff -u SOURCES/vprocunhide.init:1.10 SOURCES/vprocunhide.init:1.11
--- SOURCES/vprocunhide.init:1.10	Fri Jul  6 14:38:38 2007
+++ SOURCES/vprocunhide.init	Tue Apr 29 22:43:37 2008
@@ -4,6 +4,8 @@
 #
 # chkconfig: 2345 26 74
 # description: Makes some /proc entries visibly for vservers
+#
+# $Id$
 
 # if kernel not capable, exit early
 if [ ! -d /proc/virtual ]; then
@@ -49,20 +51,20 @@
 }
 
 case "$1" in
-start|restart|reload)
+  start|restart|reload)
 	start
 	;;
-stop)
+  stop)
 	stop
 	;;
-status)
-	if [ -f /var/lock/subsys/vprocunhide ] ; then
+  status)
+	if [ -f /var/lock/subsys/vprocunhide ]; then
 		echo "vservers /proc entries were fixed"
 	else
 		echo "vservers /proc entries were not fixed"
 	fi
 	;;
-*)
+  *)
 	msg_usage "$0 {start|stop|reload|restart|status}"
 	exit 3
 	;;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/vrootdevices.init?r1=1.4&r2=1.5&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/vservers-legacy.init?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rebootmgr.init?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/vprocunhide.init?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list