Skip to content

Commit 2d595fd

Browse files
authored
Merge pull request #62 from wferi/to-upstream
Spelling and init script changes
2 parents dbae8ab + c1aa321 commit 2d595fd

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

man/sbd.8.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ node must be manually "unfenced" by sending an empty message to it:
294294
Set the start-up wait time for devices. (Defaults to I<120>.)
295295

296296
Dynamic block devices such as iSCSI might not be fully initialized and
297-
present yet. This allows to set a timeout for waiting for devices to
297+
present yet. This allows one to set a timeout for waiting for devices to
298298
appear on start-up. If set to 0, start-up will be aborted immediately if
299299
no devices are available.
300300

src/sbd-common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,12 +780,12 @@ do_exit(char kind, bool do_flush)
780780
cl_log(LOG_NOTICE, "Initiating kdump");
781781

782782
} else if (debug_mode == 1) {
783-
cl_log(LOG_WARNING, "Initiating kdump instead of panicing the node (debug mode)");
783+
cl_log(LOG_WARNING, "Initiating kdump instead of panicking the node (debug mode)");
784784
kind = 'c';
785785
}
786786

787787
if (debug_mode == 2) {
788-
cl_log(LOG_WARNING, "Shutting down SBD instead of panicing the node (debug mode)");
788+
cl_log(LOG_WARNING, "Shutting down SBD instead of panicking the node (debug mode)");
789789
watchdog_close(true);
790790
exit(0);
791791
}

src/sbd.sh.in

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,30 @@
1616
# with this program; if not, write to the Free Software Foundation, Inc.,
1717
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1818
#
19+
### BEGIN INIT INFO
20+
# Provides: sbd
21+
# Required-Start: $network $remote_fs
22+
# Should-Start: $syslog iscsi multipath-tools corosync
23+
# X-Start-Before: pacemaker
24+
# Required-Stop: $network $remote_fs
25+
# Should-Stop: iscsi multipath-tools corosync
26+
# X-Stop-After: pacemaker
27+
# Default-Start: 2 3 4 5
28+
# Default-Stop: 0 1 6
29+
# Short-Description: Shared-storage based fencing daemon
30+
# Description: SBD provides a node fencing mechanism for
31+
# Pacemaker-based clusters through the exchange of
32+
# messages via shared block storage such as for
33+
# example a SAN, iSCSI, FCoE. It can be used as
34+
# a STONITH mechanism in all configurations that
35+
# have reliable shared storage.
36+
### END INIT INFO
1937

2038
SBD_CONFIG=@CONFIGDIR@/sbd
2139
SBD_BIN="/usr/sbin/sbd"
2240

41+
[ -e /lib/lsb/init-functions ] && . /lib/lsb/init-functions
42+
2343
test -x $SBD_BIN || exit 1
2444
test -f $SBD_CONFIG || exit 1
2545

@@ -84,11 +104,23 @@ stop() {
84104
done
85105
}
86106

107+
status() {
108+
if pidofproc -p $SBD_PIDFILE $SBD_BIN >/dev/null 2>&1 ; then
109+
echo "SBD is running."
110+
return 0
111+
else
112+
echo "SBD is not running."
113+
return 1
114+
fi
115+
}
116+
87117
case "$1" in
88-
start|stop)
118+
start|stop|status)
89119
$1 ;;
120+
restart|force-reload)
121+
stop; start ;;
90122
*)
91-
echo "Usage: $0 (start|stop)"
123+
echo "Usage: $0 (start|stop|status|restart|force-reload)"
92124
exit 1
93125
;;
94126
esac

src/sbd.sysconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ SBD_WATCHDOG_DEV=/dev/watchdog
5858
## Type: integer
5959
## Default: 5
6060
#
61-
# How long, in seconds, the watchdog will wait before panicing the
61+
# How long, in seconds, the watchdog will wait before panicking the
6262
# node if no-one tickles it.
6363
#
6464
# This depends mostly on your storage latency; the majority of devices

0 commit comments

Comments
 (0)