From 72acdcaa0a2724cf1672ef91e5ec00a2f6d3aa86625317232118053316b73129 Mon Sep 17 00:00:00 2001 From: Christian Kornacker Date: Tue, 10 Jun 2014 10:53:07 +0000 Subject: [PATCH] - enable systemd slapd service if SysV ldap was enabled (bnc#881476) OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=121 --- openldap2-client.changes | 5 +++++ openldap2-client.spec | 6 ++++++ openldap2.changes | 5 +++++ openldap2.spec | 6 ++++++ 4 files changed, 22 insertions(+) diff --git a/openldap2-client.changes b/openldap2-client.changes index 5b37953..8e1b020 100644 --- a/openldap2-client.changes +++ b/openldap2-client.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 6 13:16:24 UTC 2014 - ckornacker@suse.com + +- enable systemd slapd service if SysV ldap was enabled (bnc#881476) + ------------------------------------------------------------------- Tue May 13 15:20:40 UTC 2014 - coolo@suse.com diff --git a/openldap2-client.spec b/openldap2-client.spec index 35f4635..f6a72bf 100644 --- a/openldap2-client.spec +++ b/openldap2-client.spec @@ -554,6 +554,9 @@ then cp -p --remove-destination /etc/openldap/schema/* $TEMPDIR echo $TEMPDIR > /etc/openldap/UPDATE_NEEDED ; fi +if chkconfig ldap 2>&1 | grep -q on; then + touch /var/run/enable_slapd_service +fi %service_add_pre slapd.service %post @@ -564,6 +567,9 @@ fi %{fillup_only -n openldap ldap} %{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER} %service_add_post slapd.service +if [ -f /var/run/enable_slapd_service ]; then + /usr/bin/systemctl --quiet enable slapd +fi %preun %service_del_preun slapd.service diff --git a/openldap2.changes b/openldap2.changes index 5b37953..8e1b020 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 6 13:16:24 UTC 2014 - ckornacker@suse.com + +- enable systemd slapd service if SysV ldap was enabled (bnc#881476) + ------------------------------------------------------------------- Tue May 13 15:20:40 UTC 2014 - coolo@suse.com diff --git a/openldap2.spec b/openldap2.spec index 1dbe6e9..045ae43 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -554,6 +554,9 @@ then cp -p --remove-destination /etc/openldap/schema/* $TEMPDIR echo $TEMPDIR > /etc/openldap/UPDATE_NEEDED ; fi +if /usr/bin/chkconfig ldap 2>&1 | grep -q on; then + touch /var/run/enable_slapd_service +fi %service_add_pre slapd.service %post @@ -564,6 +567,9 @@ fi %{fillup_only -n openldap ldap} %{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER} %service_add_post slapd.service +if [ -f /var/run/enable_slapd_service ]; then + /usr/bin/systemctl --quiet enable slapd +fi %preun %service_del_preun slapd.service