|
From: Serge L. <sma...@us...> - 2007-11-26 10:25:18
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv1503 Modified Files: openl2tpd Log Message: - adapt for DL Index: openl2tpd =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/scripts/openl2tpd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- openl2tpd 26 Nov 2007 09:51:06 -0000 1.1 +++ openl2tpd 26 Nov 2007 10:25:06 -0000 1.2 @@ -42,19 +42,14 @@ echo "$DAEMON not found. Did you install the package?" exit 1 fi - # See how we were called. - -prog="openl2tpd" start() { echo -n $"Starting $NAME: " if [ -e /var/lock/subsys/openl2tpd ]; then if [ -e /var/run/openl2tpd.pid ] && [ -e /proc/`cat /var/run/openl2tpd.pid` ]; then - echo -n $"cannot start openl2tpd: openl2tpd is already running."; - failure $"cannot start openl2tpd: openl2tpd already running."; - echo + print_status warning running return 1 fi fi @@ -64,7 +59,7 @@ loadproc $DAEMON $OPENL2TPDARGS fi RETVAL=$? - echo + if [ $RETVAL -eq 0 ]; then touch /var/lock/subsys/openl2tpd if [ -n "$OPENL2TPD_CONFIG_FILE" ]; then @@ -78,25 +73,15 @@ } stop() { - echo -n $"Stopping $prog: " - if [ ! -e /var/lock/subsys/openl2tpd ]; then - echo -n $"cannot stop openl2tpd: openl2tpd is not running." - failure $"cannot stop openl2tpd: openl2tpd is not running." - echo - return 1; - fi + echo -n $"Stopping $NAME: " killproc openl2tpd RETVAL=$? modprobe -s -r pppol2tp - echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/openl2tpd; return $RETVAL } -rhstatus() { - status openl2tpd -} - restart() { stop start @@ -124,14 +109,11 @@ reload) reload ;; - status) - rhstatus - ;; condrestart) [ -f /var/lock/subsys/openl2tpd ] && restart || : ;; *) - echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}" + echo $"Usage: $0 {start|stop|reload|restart|condrestart}" exit 1 esac |