Author: qboosh                       Date: Thu Dec 25 10:46:37 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- added try-restart

---- Files affected:
SOURCES:
   dahdi.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/dahdi.init
diff -u SOURCES/dahdi.init:1.1 SOURCES/dahdi.init:1.2
--- SOURCES/dahdi.init:1.1      Wed Dec 24 22:42:04 2008
+++ SOURCES/dahdi.init  Thu Dec 25 11:46:31 2008
@@ -49,6 +49,16 @@
        fi
 }
 
+condrestart() {
+       if [ -f /var/lock/subsys/dahdi ]; then
+               stop
+               start
+       else
+               msg_not_running dahdi
+               RETVAL=$1
+       fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -58,13 +68,13 @@
   stop)
        stop
        ;;
-  status)
-       RETVAL=0
-       ;;
   restart)
        stop
        start
        ;;
+  try-restart)
+       condrestart 0
+       ;;
   reload|force-reload|graceful)
        if [ -f /var/lock/subsys/dahdi ]; then
                /sbin/ztcfg
@@ -74,8 +84,11 @@
                RETVAL=7
        fi
        ;;
+  status)
+       RETVAL=0
+       ;;
   *)
-       msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|status}"
+       msg_usage "$0 
{start|stop|restart|try-restart|reload|force-reload|graceful|status}"
        exit 3
        ;;
 esac
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/dahdi.init?r1=1.1&r2=1.2&f=u

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

Reply via email to