]> git.pld-linux.org Git - packages/fbset.git/blobdiff - fbset.init
- cosmetics
[packages/fbset.git] / fbset.init
index ff26127262427d3992c91bb812ff5e741cb8eadc..d382c445962d61f6c69b666cb9d050a5406e133b 100644 (file)
@@ -36,9 +36,7 @@ if [ -z "${FBDEV_NUM}" ]; then
        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,30 +87,37 @@ case "$1" in
        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.
        if [ -f /proc/fb ]; then
                # /proc files show as files with size=0, this is a workaround.
                cat /proc/fb | grep -q "." && nls "Frame buffer present." && exit 0
-               nls "Frame buffer not present."
-               exit 3
-       else
-               nls "Frame buffer not present."
-               exit 3
        fi
+
+       nls "Frame buffer not present."
+       exit 3
        ;;
   restart|force-reload)
-       $0 stop
-       $0 start
-#      exit $?
+       stop
+       start
        ;;
   *)
        msg_usage "$0 {start|stop|restart|force-reload|status}"
This page took 0.048695 seconds and 4 git commands to generate.