Skip to content

Commit f542fab

Browse files
committed
fence_sbd: Pick up the build-time detection on the "initconfdir" in configure.ac
for the sysconfig path so that it'd be friendly as well for other distributions
1 parent 22537ec commit f542fab

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

agents/sbd/fence_sbd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
PATH_NOT_EXISTS = -1
1616
PATH_NOT_BLOCK = -2
1717

18-
SYSCONFIG_SBD = "/etc/sysconfig/sbd"
18+
SYSCONFIG_SBD = "@INITCONFDIR@/sbd"
1919

2020
def is_block_device(filename):
2121
"""Checks if a given path is a valid block device

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ AM_CONDITIONAL([xvmcompat], [test "x$xvmcompat" == "xyes"])
460460
# Try to detect the appropriate conf dir. Several systems have both /etc/default
461461
# and /etc/sysconfig but latter is always primary.
462462
AC_ARG_VAR(initconfdir, [directory for initscripts configuration])
463-
if test "x$initconfdir" = x && test "x$FENCE_VIRT" = "x1"; then
463+
if test "x$initconfdir" = x; then
464464
AC_CHECK_FILE(/etc/conf.d, [initconfdir='$(sysconfdir)/conf.d}'], [# Gentoo/Arch
465465
AC_CHECK_FILE(/etc/sysconfig, [initconfdir='$(sysconfdir)/sysconfig'], [# RedHat/Fedora/Slax/Mandriva/S
466466
AC_CHECK_FILE(/etc/default, [initconfdir='$(sysconfdir)/default'], [# Debian/Ubuntu

make/fencebuild.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define gen_agent_from_py
88
-e 's#@''LOGDIR@#${LOGDIR}#g' \
99
-e 's#@''SBINDIR@#${sbindir}#g' \
1010
-e 's#@''LIBEXECDIR@#${libexecdir}#g' \
11+
-e 's#@''INITCONFDIR@#${initconfdir}#g' \
1112
-e 's#@''FENCETMPDIR@#${FENCETMPDIR}#g' \
1213
-e 's#@''IPMITOOL_PATH@#${IPMITOOL_PATH}#g' \
1314
-e 's#@''OPENSTACK_PATH@#${OPENSTACK_PATH}#g' \

0 commit comments

Comments
 (0)