X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=initscripts%2Fnm;h=375e157139b654de2fe3261a31e5f629044b1927;hb=12c74117e7e48984c7fa26617c321bd445a3c4fb;hp=61b7254c972a81bf24c081a7ee28a4a691d183ed;hpb=db2e08761364c07e0c703b51df770fca7be8301e;p=nodemanager.git diff --git a/initscripts/nm b/initscripts/nm index 61b7254..375e157 100755 --- a/initscripts/nm +++ b/initscripts/nm @@ -20,6 +20,8 @@ nm=${NM-"python /usr/share/NodeManager/nm.py"} prog="Node Manager" options=${OPTIONS-"-d -s"} restartoptions=${RESTARTOPTIONS-"-d"} +# debug mode is interactive, and has faster period +debugoptions=${DEBUGOPTIONS-"-p 60 -r 31"} pidfile=${PIDFILE-/var/run/nm.pid} lockfile=${LOCKFILE-/var/lock/subsys/nm} RETVAL=0 @@ -48,34 +50,33 @@ stop() [ $RETVAL -eq 0 ] && rm -f ${lockfile} ${pidfile} } -restart() -{ - stop - do_start $restartoptions -} - - case "$1" in start) - start - ;; + start + ;; stop) - stop - ;; + stop + ;; status) - status $nm - RETVAL=$? - ;; + status $nm + RETVAL=$? + ;; restart|reload) - restart - ;; + stop + do_start $restartoptions + ;; + restartdebug) + stop + echo "Running interactively .." + $nm $debugoptions + ;; condrestart) - if [ -f ${pidfile} ] ; then - restart - fi + if [ -f ${pidfile} ] ; then + restart + fi ;; *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" + echo $"Usage: $0 {start|stop|restart|condrestart|status|restartdebug}" exit 1 esac