]> git.pld-linux.org Git - packages/util-vserver.git/commitdiff
- cosmetics
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 29 Apr 2008 20:43:37 +0000 (20:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rebootmgr.init -> 1.3
    vprocunhide.init -> 1.11
    vrootdevices.init -> 1.5
    vservers-legacy.init -> 1.3

rebootmgr.init
vprocunhide.init
vrootdevices.init
vservers-legacy.init

index 5dd214314d4b7e9ad4ea8d30afe3cc52513db710..cae15c68c5032ce01f57ede5522a85ef1f828cc4 100644 (file)
@@ -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 @@ fi
 
 # 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 @@ case "$1" in
            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 f4462b859e753253d6d9d152de861ebf6b3ac407..317f6c6506354e5c09e24fa07689b0f942ade1ee 100644 (file)
@@ -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 @@ stop() {
 }
 
 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
        ;;
index 3e85bc9500d67973ab02772d68792b8127e962d5..8e274abf2e4e9e4cc33354dbfe0f563c0a75c624 100644 (file)
@@ -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 @@ case "$1" in
   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 d72020966df3793c8e7ef780d98f6e34ad497196..282767de430f28a7ac1b888529b5bfdaef500491 100644 (file)
@@ -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 @@ fi
 sortserver(){
        (
        cd $__CONFDIR
-       for serv in *.conf
-       do
+       for serv in *.conf; do
                test -f "$serv" || continue
 
                PRIORITY=100
@@ -32,8 +33,7 @@ sortserver(){
 
 startservers(){
        cd $__CONFDIR
-       for name in `sortserver`
-       do
+       for name in $(sortserver); do
                ONBOOT=
                . $name.conf
                if [ "$ONBOOT" = "yes" ] ; then
@@ -49,9 +49,9 @@ case "$1" in
            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 @@ case "$1" in
            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 @@ case "$1" in
        $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
This page took 0.115642 seconds and 4 git commands to generate.