1 --- sanlock-2.5/init.d/sanlock.orig 2012-09-30 10:16:54.308331928 +0200
2 +++ sanlock-2.5/init.d/sanlock 2012-09-30 10:51:21.691622171 +0200
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
28 + if [ ! -f /var/lock/subsys/sanlock ]; then
29 + msg_not_running "sanlock"
32 PID=$(pidofproc -p $runfile $prog)
34 - echo -n $"Sending stop signal $prog ($PID): "
35 killproc -p $runfile $prog -TERM
39 if [ $retval -ne 0 ]; then
43 - echo -n $"Waiting for $prog ($PID) to stop:"
44 + show "Waiting for %s (%s) to stop:" "$prog" "$PID"
48 while checkpid $PID; do
50 timeout=$((timeout - 1))
51 if [ "$timeout" -le 0 ]; then
80 - rh_status >/dev/null 2>&1
82 + if [ ! -f /var/lock/subsys/sanlock ]; then
83 + msg_not_running "sanlock"
94 - rh_status_q && exit 0
99 - rh_status_q || exit 0
109 - rh_status_q || exit 7
121 - condrestart|try-restart)
122 - rh_status_q || exit 0
124 + status --pidfile $runfile sanlock
128 - echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
130 + msg_usage "$0 {start|stop|status|restart||try-restart|force-reload}"
135 --- sanlock-2.5/init.d/wdmd.orig 2012-09-24 17:35:09.000000000 +0200
136 +++ sanlock-2.5/init.d/wdmd 2012-09-30 10:51:00.684955942 +0200
138 # wdmd - watchdog multiplexing daemon
140 # chkconfig: 2345 97 03
141 -# description: starts and stops sanlock daemon
142 +# description: starts and stops wdmd daemon
149 if [ ! -c /dev/watchdog ]; then
150 - echo -n $"Loading the softdog kernel module: "
151 + show "Loading the softdog kernel module: "
152 modprobe softdog && udevadm settle
153 - [ -c /dev/watchdog ] && success || failure
155 + [ -c /dev/watchdog ] && ok || fail
160 + # Check if the service is already running?
161 + if [ -f /var/lock/subsys/wdmd ]; then
162 + msg_already_running "wdmd"
168 - [ -x $exec ] || exit 5
170 - if [ ! -d /var/run/$prog ]; then
171 - install -d -g $WDMDGROUP -m 775 /var/run/$prog
172 - [ -x /sbin/restorecon ] && restorecon /var/run/$prog
175 - echo -n $"Starting $prog: "
176 + msg_starting "wdmd"
177 daemon $prog $WDMDOPTS
180 [ $retval -eq 0 ] && touch $lockfile
185 + if [ ! -f /var/lock/subsys/wdmd ]; then
186 + msg_not_running "wdmd"
189 PID=$(pidofproc -p $runfile $prog)
191 - echo -n $"Sending stop signal $prog ($PID): "
192 killproc -p $runfile $prog -TERM
196 if [ $retval -ne 0 ]; then
200 - echo -n $"Waiting for $prog ($PID) to stop:"
201 + show "Waiting for %s (%s) to stop:" "$prog" "$PID"
204 while checkpid $PID; do
206 timeout=$((timeout - 1))
207 if [ "$timeout" -le 0 ]; then
223 - rh_status_q && stop
236 - rh_status >/dev/null 2>&1
238 + if [ ! -f /var/lock/subsys/wdmd ]; then
239 + msg_not_running "wdmd"
249 - rh_status_q && exit 0
254 - rh_status_q || exit 0
262 - rh_status_q || exit 7
276 - condrestart|try-restart)
277 - rh_status_q || exit 0
280 + status --pidfile $runfile wdmd
283 - echo $"Usage $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
284 + msg_usage "$0 {start|stop|status|restart|try-restart|force-reload}"