Skip to content

Commit 7e958a9

Browse files
authored
Merge pull request #108 from wenningerk/add_envdoc
Doc: add environment section to man-page
2 parents 4b617a1 + 9dd82a8 commit 7e958a9

6 files changed

Lines changed: 23 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ sbd.sh
2424
*.orig
2525
*.rej
2626
*.rpm
27+
*.pod
2728
*.tar.*
2829
!.copr/Makefile
2930
sbd-*/

Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ TARFILE = $(distdir).tar.gz
99
DIST_ARCHIVES = $(TARFILE)
1010
KEEP_EXISTING_TAR = no
1111
INJECT_GIT_COMMIT = yes
12-
DISTCLEANFILES = sbd-* sbd-*/
1312
CLEANFILES = *.rpm *.tar.* sbd-*
13+
DISTCLEANFILES = sbd-* sbd-*/
1414

1515
RPM_ROOT = $(shell pwd)
1616
RPM_OPTS = --define "_sourcedir $(RPM_ROOT)" \
@@ -31,7 +31,7 @@ export SBD_BINARY := src/sbd
3131
export SBD_PRELOAD := tests/.libs/libsbdtestbed.so
3232
export SBD_USE_DM := no
3333

34-
EXTRA_DIST = sbd.spec tests/regressions.sh
34+
EXTRA_DIST = sbd.spec tests/regressions.sh man/sbd.8.pod.in
3535

3636
export:
3737
rm -f $(PACKAGE)-HEAD.tar.*
@@ -43,7 +43,7 @@ export:
4343
echo `date`: Using existing tarball: $(TARFILE); \
4444
else \
4545
rm -f $(PACKAGE).tar.*; \
46-
(git archive --prefix=$(distdir)/ $(shell echo $(TAG)|cut -f1 -d-) || tar -c --transform="s,^,$(distdir)/," --exclude="*.tar.*" --exclude="$(distdir)" --exclude="*.o" --exclude="*.8" --exclude="config.*" --exclude="libtool" --exclusive="ltmain.sh*" --exclude="Makefile" --exclude="Makefile.in" --exclude="stamp-*" --exclude="*.service" --exclude="sbd" --exclude="*.m4" --exclude="*.cache" --exclude="configure" --exclude="*.list" --exclude="depcomp" --exclude="install-sh" --exclude="missing" --exclude="compile" --exclude="sbd.sh" --exclude="~" --exclude="*.swp" --exclude="*.patch" --exclude="*.diff" --exclude="*.orig" --exclude="*.rej" --exclude="*.rpm" --exclude=".deps" --exclude="test-driver" *) | gzip > $(TARFILE); \
46+
(git archive --prefix=$(distdir)/ $(shell echo $(TAG)|cut -f1 -d-) || tar -c --transform="s,^,$(distdir)/," --exclude="*.tar.*" --exclude="$(distdir)" --exclude="*.o" --exclude="*.8" --exclude="config.*" --exclude="libtool" --exclude="ltmain.sh*" --exclude="Makefile" --exclude="Makefile.in" --exclude="stamp-*" --exclude="*.service" --exclude="sbd" --exclude="*.m4" --exclude="*.cache" --exclude="configure" --exclude="*.list" --exclude="depcomp" --exclude="install-sh" --exclude="missing" --exclude="compile" --exclude="sbd.sh" --exclude="~" --exclude="*.swp" --exclude="*.patch" --exclude="*.diff" --exclude="*.orig" --exclude="*.rej" --exclude="*.rpm" --exclude="*.pod" --exclude=".deps" --exclude="test-driver" *) | gzip > $(TARFILE); \
4747
if test -n "$$(git status -s)" || test "$(INJECT_GIT_COMMIT)" = "yes"; then \
4848
if test -n "$$(git status -s)"; then git diff HEAD --name-only|grep -v "^\."|xargs -n1 git diff HEAD > uncommitted.diff; fi; \
4949
rm -rf $(distdir); tar -xzf $(TARFILE); rm $(TARFILE); \

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ A highly reliable fencing or Shoot-the-other-node-in-the-head (STONITH) mechanis
55
The component works with Pacemaker clusters, and is currently known to
66
compile and function on Pacemaker 1.1.7+ and corosync 1.4.x or 2.3.x.
77

8-
Please see https://github.com/l-mb/sbd/blob/master/man/sbd.8.pod for the full documentation.
8+
Please see https://github.com/clusterlabs/sbd/blob/master/man/sbd.8.pod.in &
9+
https://github.com/clusterlabs/sbd/blob/master/src/sbd.sysconfig for the full documentation.
910

man/Makefile.am

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
dist_man_MANS = sbd.8
22

3-
EXTRA_DIST = sbd.8.pod
3+
DISTCLEANFILES = sbd.8.pod sbd.8 sbd.sysconfig.pod
4+
5+
sbd.sysconfig.pod: ../src/sbd.sysconfig
6+
sed -r -n -e "s/^## Type: (.*)/Allows C<\1>/;t type;s/^## Default: (.*)/ defaulting to C<\1>/;t default;s/^#*(.*)=.*/=item B<\1>\n/;t variable;s/^#*//;s/^ *//;H;d;:type;h;d;:default;H;x;s/\n//;x;d;:variable;G;p" $< > $@
7+
8+
sbd.8.pod: sbd.8.pod.in sbd.sysconfig.pod
9+
sed -e "s/@environment_section@//;t insert;p;d;:insert;rsbd.sysconfig.pod" $< > $@
410

511
sbd.8: sbd.8.pod
612
@POD2MAN@ -s 8 -c "STONITH Block Device" -r "SBD" -n "SBD" $< $@

man/sbd.8.pod renamed to man/sbd.8.pod.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,17 @@ options to pass to the daemon:
568568
SBD_PACEMAKER="true"
569569

570570
C<sbd> will fail to start if no C<SBD_DEVICE> is specified. See the
571-
installed template for more options that can be configured here.
571+
installed template or section for configuration via environment
572+
for more options that can be configured here.
572573
In general configuration done via parameters takes precedence over
573574
the configuration from the configuration file.
574575

576+
=head2 Configuration via environment
577+
578+
=over
579+
@environment_section@
580+
=back
581+
575582
=head2 Testing the sbd installation
576583

577584
After a restart of the cluster stack on this node, you can now try

src/sbd.sysconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
SBD_PACEMAKER=yes
1616

17-
## Type: list(always,clean)
17+
## Type: always / clean
1818
## Default: always
1919
#
2020
# Specify the start mode for sbd. Setting this to "clean" will only
@@ -103,6 +103,7 @@ SBD_TIMEOUT_ACTION=flush,reboot
103103
# Thus in auto-mode sbd will check if the slice has RT-budget assigned.
104104
# If that is the case sbd will stay in that slice while it will
105105
# be moved to root-slice otherwise.
106+
#
106107
SBD_MOVE_TO_ROOT_CGROUP=auto
107108

108109
## Type: string

0 commit comments

Comments
 (0)