Author: glen                         Date: Tue Apr  3 20:48:29 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use functions

---- Files affected:
SOURCES:
   smb.init (1.19 -> 1.20) 

---- Diffs:

================================================================
Index: SOURCES/smb.init
diff -u SOURCES/smb.init:1.19 SOURCES/smb.init:1.20
--- SOURCES/smb.init:1.19       Tue May 30 13:40:40 2006
+++ SOURCES/smb.init    Tue Apr  3 22:48:24 2007
@@ -36,10 +36,7 @@
 # Check that smb.conf exists.
 [ -f /etc/samba/smb.conf ] || exit 0
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
+start() {
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/smb ]; then
                msg_starting smbd
@@ -52,8 +49,9 @@
        else
                msg_already_running smb
        fi
-       ;;
-  stop)
+}
+
+stop() {
        # Stop daemons.
        if [ -f /var/lock/subsys/smb ]; then
                msg_stopping smbd
@@ -64,6 +62,16 @@
        else
                msg_not_running smb
        fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
        ;;
   status)
        status smbd
@@ -74,9 +82,8 @@
        smbstatus
        ;;
   restart)
-       $0 stop
-       $0 start
-       exit $?
+       stop
+       start
        ;;
   reload|force-reload)
        if [ -f /var/lock/subsys/smb ]; then
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/smb.init?r1=1.19&r2=1.20&f=u

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

Reply via email to