SOURCES: fbset.init - use functions

glen glen at pld-linux.org
Thu Dec 7 19:16:27 CET 2006


Author: glen                         Date: Thu Dec  7 18:16:27 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   fbset.init (1.27 -> 1.28) 

---- Diffs:

================================================================
Index: SOURCES/fbset.init
diff -u SOURCES/fbset.init:1.27 SOURCES/fbset.init:1.28
--- SOURCES/fbset.init:1.27	Thu Dec  7 19:15:31 2006
+++ SOURCES/fbset.init	Thu Dec  7 19:16:22 2006
@@ -36,9 +36,7 @@
 	FBDEV_NUM=0
 fi
 
-# See how we were called.
-case "$1" in
-  start)
+start() {
 	# Check if service is already running?
 	if [ ! -f /var/lock/subsys/fbset ]; then
 
@@ -89,13 +87,23 @@
 	else
 		msg_already_running fbset
 	fi
-	;;
-  stop)
+}
+
+stop() {
 	if [ -f /var/lock/subsys/fbset ]; then
 		rm -f /var/lock/subsys/fbset
 	else
 		msg_not_running fbset
 	fi
+}
+
+# See how we were called.
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
 	;;
   status)
 	# Check if we have framebuffer in kernel.
@@ -110,9 +118,8 @@
 	fi
 	;;
   restart|force-reload)
-	$0 stop
-	$0 start
-#	exit $?
+	stop
+	start
 	;;
   *)
 	msg_usage "$0 {start|stop|restart|force-reload|status}"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/fbset.init?r1=1.27&r2=1.28&f=u



More information about the pld-cvs-commit mailing list