Author: glen                         Date: Wed May  9 20:47:01 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   noip.init (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/noip.init
diff -u SOURCES/noip.init:1.3 SOURCES/noip.init:1.4
--- SOURCES/noip.init:1.3       Wed May  9 19:40:10 2007
+++ SOURCES/noip.init   Wed May  9 22:46:56 2007
@@ -17,9 +17,7 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
-RETVAL=0
-case "$1" in
-  start)
+start() {
        if [ ! -s /etc/noip.conf ]; then
                echo "You should first run $0 config to prepare configuration";
                exit 3
@@ -32,8 +30,9 @@
        else
                msg_already_runing noip
        fi
-       ;;
-  stop)
+}
+
+stop() {
        if [ -f /var/lock/subsys/noip ]; then
                msg_stopping noip
                killproc noip
@@ -41,11 +40,19 @@
        else
                msg_not_running noip
        fi
+}
+
+RETVAL=0
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   restart)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   config|status)
        noip -C
================================================================

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

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

Reply via email to