]> git.pld-linux.org Git - packages/util-vserver.git/blobdiff - vrootdevices.init
- up to pre3002; /etc/tld-release shouldn't be required
[packages/util-vserver.git] / vrootdevices.init
index 135800d55007abc84e1a646df174f45dff9ee9e8..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
@@ -42,8 +44,7 @@ remove_vroot()
        done
 }
 
-case "$1" in
-  start|reload)
+start() {
        if [ ! -f /var/lock/subsys/vrootdevices ]; then
                msg_starting vrootdevices
                ok
@@ -52,9 +53,9 @@ case "$1" in
        else
                msg_already_running vrootdevices
        fi
+}
 
-       ;;
-  stop)
+stop() {
        if [ -f /var/lock/subsys/vrootdevices ]; then
                msg_stopping vrootdevices
                ok
@@ -63,27 +64,26 @@ case "$1" in
        else
                msg_not_running vrootdevices
        fi
+}
+
+case "$1" in
+  start|reload)
+       start
        ;;
-  status)
-       ID=`id -u`
-       if [ $ID -eq 0 ]; then
-               echo "There is no way to tell"
-       else
-               # don't remove the space at the end!!!
-               nls "You need to be root to use this command ! "
-       fi
+  stop)
+       stop
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
+       stop
+       start
+       ;;
+  status)
+       echo "There is no way to tell"
        ;;
   *)
-       echo "Usage: $0 {start|stop|restart|reload|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
        exit 3
        ;;
 esac
 
 exit $RETVAL
-
-# This must be last line !
-# vi:syntax=sh
This page took 0.060139 seconds and 4 git commands to generate.