git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4ead34
)
do 'restart' without the -s option
author
Marc Fiuczynski
<mef@cs.princeton.edu>
Thu, 10 May 2007 15:53:34 +0000
(15:53 +0000)
committer
Marc Fiuczynski
<mef@cs.princeton.edu>
Thu, 10 May 2007 15:53:34 +0000
(15:53 +0000)
nm.init
patch
|
blob
|
history
diff --git
a/nm.init
b/nm.init
index
d97c215
..
ed70c67
100755
(executable)
--- a/
nm.init
+++ b/
nm.init
@@
-5,7
+5,7
@@
# chkconfig: 3 86 26
# description: Starts and stops Node Manager daemon
#
# chkconfig: 3 86 26
# description: Starts and stops Node Manager daemon
#
-# $Id:
vnet.init,v 1.21 2006/02/27 15:41:27
mlhuang Exp $
+# $Id:
nm.init,v 1.1 2006/11/13 20:04:44
mlhuang Exp $
# Source function library.
. /etc/init.d/functions
# Source function library.
. /etc/init.d/functions
@@
-16,13
+16,14
@@
fi
nm=${NM-"python /usr/share/NodeManager/nm.py"}
prog="Node Manager"
nm=${NM-"python /usr/share/NodeManager/nm.py"}
prog="Node Manager"
-options=${OPTIONS-"-d -s"}
+restartoptions=
pidfile=${PIDFILE-/var/run/nm.pid}
lockfile=${LOCKFILE-/var/lock/subsys/nm}
RETVAL=0
pidfile=${PIDFILE-/var/run/nm.pid}
lockfile=${LOCKFILE-/var/lock/subsys/nm}
RETVAL=0
-start()
+
do_
start()
{
{
+ options=$1
echo -n $"Starting $prog: "
daemon --check=nm $nm $options
RETVAL=$?
echo -n $"Starting $prog: "
daemon --check=nm $nm $options
RETVAL=$?
@@
-31,6
+32,11
@@
start()
return $RETVAL
}
return $RETVAL
}
+start()
+{
+ do_start ${OPTIONS-"-d -s"}
+}
+
stop()
{
echo -n $"Stopping $prog: "
stop()
{
echo -n $"Stopping $prog: "
@@
-40,6
+46,13
@@
stop()
[ $RETVAL -eq 0 ] && rm -f ${lockfile} ${pidfile}
}
[ $RETVAL -eq 0 ] && rm -f ${lockfile} ${pidfile}
}
+restart()
+{
+ stop
+ do_start ${OPTIONS-"-d"}
+}
+
+
case "$1" in
start)
start
case "$1" in
start)
start
@@
-52,13
+65,11
@@
case "$1" in
RETVAL=$?
;;
restart|reload)
RETVAL=$?
;;
restart|reload)
- stop
- start
+ restart
;;
condrestart)
if [ -f ${pidfile} ] ; then
;;
condrestart)
if [ -f ${pidfile} ] ; then
- stop
- start
+ restart
fi
;;
*)
fi
;;
*)