[Bugs] [Bug 1385249] New: /etc/ sysconfig is redhat specific and does not exist in debian or arch

bugzilla at redhat.com bugzilla at redhat.com
Sat Oct 15 16:05:57 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1385249

            Bug ID: 1385249
           Summary: /etc/sysconfig is redhat specific and does not exist
                    in debian or arch
           Product: GlusterFS
           Version: mainline
         Component: build
          Assignee: bugs at gluster.org
          Reporter: joe at julianfamily.org
                CC: bugs at gluster.org



I propose a solution like this but there are several other places
/etc/sysconfig are used that are either not processed by configure or probably
doesn't really matter.

diff --git a/configure.ac b/configure.ac
index 8aa07ff..7bd00de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,19 @@ AM_INIT_AUTOMAKE(tar-pax)
 #but libglusterfs fails to build with contrib (Then are not set up that way?)
 #AM_INIT_AUTOMAKE([subdir-objects])

+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/S
+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
+
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])

 if make --help 2>&1 | grep -q no-print-directory; then
diff --git a/extras/systemd/glusterd.service.in
b/extras/systemd/glusterd.service.in
index 26694cf..40a2928 100644
--- a/extras/systemd/glusterd.service.in
+++ b/extras/systemd/glusterd.service.in
@@ -9,7 +9,7 @@ Type=forking
 PIDFile=@localstatedir@/run/glusterd.pid
 LimitNOFILE=65536
 Environment="LOG_LEVEL=INFO"
-EnvironmentFile=- at sysconfdir@/sysconfig/glusterd
+EnvironmentFile=- at initconfdir@/glusterd
 ExecStart=@prefix@/sbin/glusterd -p @localstatedir@/run/glusterd.pid 
--log-level $LOG_LEVEL $GLUSTERD_
 KillMode=process

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list