commit 2c5b9739314833c17152866f04f4beb05647093c Author: Ximin Luo infinity0@gmx.com Date: Wed Nov 6 13:27:29 2013 +0000
only try to detect initconfdir if we actually want initscripts, and simplify --- facilitator/configure.ac | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/facilitator/configure.ac b/facilitator/configure.ac index 32d5fa4..a89e01b 100644 --- a/facilitator/configure.ac +++ b/facilitator/configure.ac @@ -4,16 +4,6 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_ARG_VAR(fpfacilitatoruser, [the user/group for the facilitator to run as]) fpfacilitatoruser="${fpfacilitatoruser:-flashproxy-fac}" -AC_ARG_VAR(initconfdir, [directory for initscripts configuration]) -# Try to detect the appropriate conf dir. Several systems have both /etc/default -# and /etc/sysconfig but latter is always primary. -AC_CHECK_FILE(/etc/conf.d, [initconfdir="${initconfdir:-$(sysconfdir)/conf.d}"], [# Gentoo/Arch -AC_CHECK_FILE(/etc/sysconfig, [initconfdir="${initconfdir:-$(sysconfdir)/sysconfig}"], [# RedHat/Fedora/Slax/Mandriva/SuSE -AC_CHECK_FILE(/etc/default, [initconfdir="${initconfdir:-$(sysconfdir)/default}"], [# Debian/Ubuntu -AC_MSG_ERROR([could not determine system's initscripts config dir, please set initconfdir manually])])])]) - -AC_PROG_LN_S -AM_PATH_PYTHON
# check that we want to install initscripts. don't bother checking that they # are supported, since we might be doing a staged install on a different system. @@ -24,6 +14,21 @@ AC_ARG_ENABLE([initscripts], [do_initscripts=yes], [do_initscripts=]) AM_CONDITIONAL([DO_INITSCRIPTS], [test "x$do_initscripts" = xyes])
+AC_ARG_VAR(initconfdir, [directory for initscripts configuration, if enabled]) +# Try to detect the appropriate conf dir. Several systems have both /etc/default +# and /etc/sysconfig but latter is always primary. +if test "x$do_initscripts" = xyes; then +if test "x$initconfdir" = x; then +AC_CHECK_FILE(/etc/conf.d, [initconfdir='$(sysconfdir)/conf.d}'], [# Gentoo/Arch +AC_CHECK_FILE(/etc/sysconfig, [initconfdir='$(sysconfdir)/sysconfig'], [# RedHat/Fedora/Slax/Mandriva/SuSE +AC_CHECK_FILE(/etc/default, [initconfdir='$(sysconfdir)/default'], [# Debian/Ubuntu +AC_MSG_ERROR([could not determine system initscripts config dir; please set initconfdir manually.])])])]) +fi +fi + +AC_PROG_LN_S +AM_PATH_PYTHON + AC_CONFIG_FILES([Makefile init.d/facilitator init.d/facilitator-email-poller
tor-commits@lists.torproject.org