1 --- sanlock-2.4/init.d/sanlock.orig 2012-07-23 16:24:38.000000000 +0200
2 +++ sanlock-2.4/init.d/sanlock 2012-09-02 21:09:14.181273151 +0200
3 @@ -32,94 +32,85 @@ SANLOCKOPTS="-U $SANLOCKUSER -G $SANLOCK
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 $prog daemon $SANLOCKOPTS
23 - [ $retval -eq 0 ] && touch $lockfile
26 + [ $RETVAL -eq 0 ] && touch $lockfile
31 - echo -n $"Sending stop signal $prog: "
32 + if [ ! -f /var/lock/subsys/sanlock ]; then
33 + msg_not_running "sanlock"
36 killproc -p $runfile $prog -TERM
41 - if [ $retval -ne 0 ]; then
43 + if [ $RETVAL -ne 0 ]; then
47 - echo -n $"Waiting for $prog to stop:"
48 + show "Waiting for %s to stop" "$prog"
51 while [ -e $runfile ]; do
53 timeout=$((timeout - 1))
54 if [ "$timeout" -le 0 ]; then
70 + if [ ! -f /var/lock/subsys/sanlock ]; then
71 + msg_not_running "sanlock"
91 - rh_status >/dev/null 2>&1
98 - rh_status_q && exit 0
103 - rh_status_q || exit 0
112 - rh_status_q || exit 7
124 - condrestart|try-restart)
125 - rh_status_q || exit 0
127 + status --pidfile $runfile sanlock
131 - echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
133 + msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
139 --- sanlock-2.4/init.d/wdmd.orig 2012-07-23 16:24:38.000000000 +0200
140 +++ sanlock-2.4/init.d/wdmd 2012-09-02 21:14:08.491267019 +0200
142 # wdmd - watchdog multiplexing daemon
144 # chkconfig: 2345 97 03
145 -# description: starts and stops sanlock daemon
146 +# description: starts and stops wdmd daemon
150 @@ -32,83 +32,69 @@ WDMDOPTS="-G $WDMDGROUP"
151 [ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
154 - [ -x $exec ] || exit 5
156 - if [ ! -d /var/run/$prog ]; then
157 - mkdir -p /var/run/$prog
158 - [ -x /sbin/restorecon ] && restorecon /var/run/$prog
160 + # Check if the service is already running?
161 + if [ -f /var/lock/subsys/wdmd ]; then
162 + msg_already_running "wdmd"
166 if [ ! -c /dev/watchdog ]; then
167 - echo -n $"Loading the softdog kernel module: "
168 + show "Loading the softdog kernel module: "
169 modprobe softdog && udevadm settle
170 - [ -c /dev/watchdog ] && success || failure
172 + [ -c /dev/watchdog ] && ok || fail
175 - echo -n $"Starting $prog: "
176 + msg_starting "wdmd"
177 daemon $prog $WDMDOPTS
180 - [ $retval -eq 0 ] && touch $lockfile
183 + [ $RETVAL -eq 0 ] && touch $lockfile
188 - echo -n $"Stopping $prog: "
189 - killproc -p $runfile $prog -TERM
192 - [ $retval -eq 0 ] && rm -f $lockfile
194 + if [ ! -f /var/lock/subsys/wdmd ]; then
195 + msg_not_running "wdmd"
198 + killproc -p $runfile $prog
200 + [ $RETVAL -eq 0 ] && rm -f $lockfile
206 + if [ ! -f /var/lock/subsys/wdmd ]; then
207 + msg_not_running "wdmd"
224 - rh_status >/dev/null 2>&1
230 - rh_status_q && exit 0
235 - rh_status_q || exit 0
245 - rh_status_q || exit 7
257 - condrestart|try-restart)
258 - rh_status_q || exit 0
260 + status --pidfile $runfile wdmd
263 - echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
265 + msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"