git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rerun initscript with 'restart' argument if the initscript is changed after the slive...
[nodemanager.git]
/
nm.init
diff --git
a/nm.init
b/nm.init
index
ed70c67
..
eda0f11
100755
(executable)
--- a/
nm.init
+++ b/
nm.init
@@
-5,7
+5,6
@@
# chkconfig: 3 86 26
# description: Starts and stops Node Manager daemon
#
# chkconfig: 3 86 26
# description: Starts and stops Node Manager daemon
#
-# $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,16
+15,16
@@
fi
nm=${NM-"python /usr/share/NodeManager/nm.py"}
prog="Node Manager"
nm=${NM-"python /usr/share/NodeManager/nm.py"}
prog="Node Manager"
-restartoptions=
+options=${OPTIONS-"-d -s"}
+restartoptions=${RESTARTOPTIONS-"-d"}
pidfile=${PIDFILE-/var/run/nm.pid}
lockfile=${LOCKFILE-/var/lock/subsys/nm}
RETVAL=0
do_start()
{
pidfile=${PIDFILE-/var/run/nm.pid}
lockfile=${LOCKFILE-/var/lock/subsys/nm}
RETVAL=0
do_start()
{
- options=$1
echo -n $"Starting $prog: "
echo -n $"Starting $prog: "
- daemon --check=nm $nm
$options
+ daemon --check=nm $nm
"$@"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch ${lockfile}
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch ${lockfile}
@@
-34,7
+33,7
@@
do_start()
start()
{
start()
{
- do_start $
{OPTIONS-"-d -s"}
+ do_start $
options
}
stop()
}
stop()
@@
-49,32
+48,32
@@
stop()
restart()
{
stop
restart()
{
stop
- do_start $
{OPTIONS-"-d"}
+ do_start $
restartoptions
}
case "$1" in
start)
}
case "$1" in
start)
-
start
-
;;
+ start
+ ;;
stop)
stop)
-
stop
-
;;
+ stop
+ ;;
status)
status)
-
status $nm
-
RETVAL=$?
-
;;
+ status $nm
+ RETVAL=$?
+ ;;
restart|reload)
restart|reload)
-
restart
-
;;
+ restart
+ ;;
condrestart)
condrestart)
-
if [ -f ${pidfile} ] ; then
-
restart
-
fi
-
;;
+ if [ -f ${pidfile} ] ; then
+ restart
+ fi
+ ;;
*)
*)
-
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
-
exit 1
+ echo $"Usage: $0 {start|stop|restart|condrestart|status}"
+ exit 1
esac
exit 0
esac
exit 0