SOURCES: vrootdevices.init - pldize, use functions

glen glen at pld-linux.org
Tue Jul 3 20:17:34 CEST 2007


Author: glen                         Date: Tue Jul  3 18:17:34 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- pldize, use functions

---- Files affected:
SOURCES:
   vrootdevices.init (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/vrootdevices.init
diff -u SOURCES/vrootdevices.init:1.2 SOURCES/vrootdevices.init:1.3
--- SOURCES/vrootdevices.init:1.2	Wed Nov 23 16:03:56 2005
+++ SOURCES/vrootdevices.init	Tue Jul  3 20:17:28 2007
@@ -42,8 +42,7 @@
 	done
 }
 
-case "$1" in
-  start|reload)
+start() {
 	if [ ! -f /var/lock/subsys/vrootdevices ]; then
 		msg_starting vrootdevices
 		ok
@@ -52,9 +51,9 @@
 	else
 		msg_already_running vrootdevices
 	fi
+}
 
-	;;
-  stop)
+stop() {
 	if [ -f /var/lock/subsys/vrootdevices ]; then
 		msg_stopping vrootdevices
 		ok
@@ -63,6 +62,14 @@
 	else
 		msg_not_running vrootdevices
 	fi
+}
+
+case "$1" in
+  start|reload)
+  	start
+	;;
+  stop)
+  	stop
 	;;
   status)
 	ID=`id -u`
@@ -74,16 +81,13 @@
 	fi
 	;;
   restart|force-reload)
-	$0 stop
-	$0 start
+	stop
+	start
 	;;
   *)
-	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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/vrootdevices.init?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list