1 --- sanlock-2.0/init.d/sanlock.orig 2012-03-02 22:13:24.000000000 +0100
2 +++ sanlock-2.0/init.d/sanlock 2012-03-07 18:27:31.785530424 +0100
4 [ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
7 - [ -x $exec ] || exit 5
9 - if [ ! -d /var/run/$prog ]; then
10 - install -d -o $SANLOCKUSER -g $SANLOCKUSER -m 775 /var/run/$prog
11 - [ -x /sbin/restorecon ] && restorecon /var/run/$prog
12 + # Check if the service is already running?
13 + if [ -f /var/lock/subsys/sanlock ]; then
14 + msg_already_running "sanlock"
18 - echo -n $"Starting $prog: "
19 + msg_starting "sanlock"
20 daemon --user=$SANLOCKUSER $prog daemon $SANLOCKOPTS
26 + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sanlock
30 - echo -n $"Stopping $prog: "
31 - killproc -p $lockfile $prog -TERM
35 + if [ ! -f /var/lock/subsys/sanlock ]; then
36 + msg_not_running "sanlock"
39 + killproc --pidfile $lockfile $prog
40 + rm -f /var/lock/subsys/sanlock
50 + if [ ! -f /var/lock/subsys/sanlock ]; then
51 + msg_not_running "sanlock"
69 - rh_status >/dev/null 2>&1
78 - rh_status_q && exit 0
83 - rh_status_q || exit 0
92 - rh_status_q || exit 7
104 - condrestart|try-restart)
105 - rh_status_q || exit 0
107 + status --pidfile $pidfile sanlock
111 - echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
113 + msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
119 --- sanlock-2.0/init.d/wdmd.orig 2012-03-02 22:13:24.000000000 +0100
120 +++ sanlock-2.0/init.d/wdmd 2012-03-07 18:26:30.102195201 +0100
122 # wdmd - watchdog multiplexing daemon
124 # chkconfig: 2345 97 03
125 -# description: starts and stops sanlock daemon
126 +# description: starts and stops wdmd daemon
131 . /etc/rc.d/init.d/functions
134 -lockfile="/var/run/$prog/$prog.pid"
135 +pidfile="/var/run/$prog/$prog.pid"
136 exec="/usr/sbin/$prog"
140 [ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
143 - [ -x $exec ] || exit 5
145 - if [ ! -d /var/run/$prog ]; then
146 - mkdir -p /var/run/$prog
147 - [ -x /sbin/restorecon ] && restorecon /var/run/$prog
148 + # Check if the service is already running?
149 + if [ -f /var/lock/subsys/wdmd ]; then
150 + msg_already_running "wdmd"
154 - echo -n $"Starting $prog: "
155 + msg_starting "wdmd"
156 daemon $prog $WDMDOPTS
159 - [ $retval -eq 0 ] && touch $lockfile
162 + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/wdmd
166 - echo -n $"Stopping $prog: "
167 - killproc -p $lockfile $prog -TERM
170 - [ $retval -eq 0 ] && rm -f $lockfile
171 + if [ ! -f /var/lock/subsys/wdmd ]; then
172 + msg_not_running "wdmd"
175 + killproc --pidfile $pidfile $prog
176 + rm -f /var/lock/subsys/wdmd
181 + if [ ! -f /var/lock/subsys/wdmd ]; then
182 + msg_not_running "wdmd"
199 - rh_status >/dev/null 2>&1
204 - rh_status_q && exit 0
209 - rh_status_q || exit 0
219 - rh_status_q || exit 7
231 - condrestart|try-restart)
232 - rh_status_q || exit 0
234 + status --pidfile $pidfile wdmd
237 - echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
239 + msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"