Author: glen                         Date: Wed Oct 17 14:25:11 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   splashutils.init (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SOURCES/splashutils.init
diff -u SOURCES/splashutils.init:1.6 SOURCES/splashutils.init:1.7
--- SOURCES/splashutils.init:1.6        Thu Dec  8 01:41:26 2005
+++ SOURCES/splashutils.init    Wed Oct 17 16:25:05 2007
@@ -21,17 +21,12 @@
 test -z "${SPLASH_THEME}" && SPLASH_THEME="default"
 test -z "${SPLASH_TTYS}" && SPLASH_TTYS="0 1 2 3 4 5 6 7"
 
-# See how we were called.
-case "$1" in
-       start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/fbsplash ]; then
                if [ -e /dev/fbsplash ] && [ -e /proc/sys/kernel/fbsplash ] && 
[ -f /etc/splash/${SPLASH_THEME}/${RES}.cfg ]; then
-
                        show "Setting framebuffer console images"; busy
-
                        for TTY in ${SPLASH_TTYS}; do
-
                                theme="${SPLASH_THEME}"
 
                                if [ -n "${SPLASH_TTY_MAP}" ]; then
@@ -48,28 +43,35 @@
                                /sbin/splash_util --vc="${TTY}" -c on 
2>/dev/null
 
                        done
-
                        ok
-
                        touch /var/lock/subsys/fbsplash
                fi
        else
                msg_already_running fbsplash
        fi
-       ;;
-       stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/fbsplash ]; then
                rm -f /var/lock/subsys/fbsplash
        else
                msg_not_running fbsplash
        fi
+}
+
+# See how we were called.
+case "$1" in
+start)
+       start
+       ;;
+stop)
+       stop
        ;;
-       restart)
-       $0 stop
-       $0 start
-       exit $?
+restart)
+       stop
+       start
        ;;
-       *)
+*)
        msg_usage "$0 {start|stop|restart}"
        exit 3
 esac
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/splashutils.init?r1=1.6&r2=1.7&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to