summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-06-24 15:30:04 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-08-08 23:12:06 +0200
commit177b18d1103fa1f3ec89dc029036c7a725214720 (patch)
tree1d224be24c524c371d93d75dab94967d33080161
parentac2bdb99d3b096610fbfeda9796a7fe5e1715253 (diff)
downloadsssd-1.9.2-104.el6.tar.gz
sssd-1.9.2-104.el6.tar.xz
sssd-1.9.2-104.el6.zip
init script: source /etc/sysconfig/sssdsssd-1.9.2-104.el6
https://fedorahosted.org/sssd/ticket/1959
-rw-r--r--configure.ac1
-rw-r--r--src/conf_macros.m413
-rw-r--r--src/sysv/sssd.in4
-rw-r--r--src/sysv/systemd/sssd.service.in1
4 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 44fbb14c5..83af146c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,6 +97,7 @@ WITH_PIPE_PATH
WITH_MCACHE_PATH
WITH_DEFAULT_CCACHE_DIR
WITH_DEFAULT_CCNAME_TEMPLATE
+WITH_ENVIRONMENT_FILE
WITH_INIT_DIR
WITH_TEST_DIR
WITH_MANPAGES
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
index 65f4d6ce9..4766930ea 100644
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -152,6 +152,19 @@ AC_DEFUN([WITH_INITSCRIPT],
AC_MSG_NOTICE([Will use init script type: $initscript])
])
+AC_DEFUN([WITH_ENVIRONMENT_FILE],
+ [ AC_ARG_WITH([environment_file],
+ [AC_HELP_STRING([--with-environment-file=PATH], [Path to environment file [/etc/sysconfig/sssd]])
+ ]
+ )
+
+ ENVIRONMENT_FILE_PATH="${sysconfdir}/sysconfig/sssd"
+ if test x"$with_environment_file" != x; then
+ ENVIRONMENT_FILE_PATH=$with_environment_file
+ fi
+ AC_SUBST(environment_file, [$ENVIRONMENT_FILE_PATH])
+ ])
+
AC_DEFUN([WITH_INIT_DIR],
[ AC_ARG_WITH([init-dir],
[AC_HELP_STRING([--with-init-dir=DIR],
diff --git a/src/sysv/sssd.in b/src/sysv/sssd.in
index 8a344be7f..6155df97c 100644
--- a/src/sysv/sssd.in
+++ b/src/sysv/sssd.in
@@ -31,6 +31,10 @@ prog="sssd"
# Source function library.
. /etc/init.d/functions
+if [ -f @environment_file@ ]; then
+ . @environment_file@
+fi
+
SSSD=@sbindir@/sssd
LOCK_FILE=@localstatedir@/lock/subsys/sssd
diff --git a/src/sysv/systemd/sssd.service.in b/src/sysv/systemd/sssd.service.in
index 30592afe2..3c1410972 100644
--- a/src/sysv/systemd/sssd.service.in
+++ b/src/sysv/systemd/sssd.service.in
@@ -4,6 +4,7 @@ Description=System Security Services Daemon
After=syslog.target
[Service]
+EnvironmentFile=-@environment_file@
ExecStart=@sbindir@/sssd -D -f
# These two should be used with traditional UNIX forking daemons
# consult systemd.service(5) for more details