aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-support/nss-pam-ldapd
diff options
context:
space:
mode:
authorLiang Li <liang.li@windriver.com>2016-04-28 10:49:41 +0800
committerBruce Ashfield <bruce.ashfield@windriver.com>2016-04-28 09:20:51 -0400
commit4b15072ef54c570c0aee729abfb420c78a981ebc (patch)
treeb0b5cbb49d6548ba3baf9fb72bacf115a7eb646d /recipes-support/nss-pam-ldapd
parent05b5ca77a32df5bd68f6a09002e3e8161673bd9e (diff)
downloadmeta-cloud-services-4b15072ef54c570c0aee729abfb420c78a981ebc.tar.gz
meta-cloud-services-4b15072ef54c570c0aee729abfb420c78a981ebc.tar.bz2
meta-cloud-services-4b15072ef54c570c0aee729abfb420c78a981ebc.zip
nss-pam-ldapd: add systemd support
Just add systemd style service file. Signed-off-by: Liang Li <liang.li@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-support/nss-pam-ldapd')
-rw-r--r--recipes-support/nss-pam-ldapd/files/nslcd.service10
-rw-r--r--recipes-support/nss-pam-ldapd/nss-pam-ldapd_0.9.6.bb10
2 files changed, 18 insertions, 2 deletions
diff --git a/recipes-support/nss-pam-ldapd/files/nslcd.service b/recipes-support/nss-pam-ldapd/files/nslcd.service
new file mode 100644
index 0000000..bc67242
--- /dev/null
+++ b/recipes-support/nss-pam-ldapd/files/nslcd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=LDAP daemon
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/nslcd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-support/nss-pam-ldapd/nss-pam-ldapd_0.9.6.bb b/recipes-support/nss-pam-ldapd/nss-pam-ldapd_0.9.6.bb
index 9f822f3..c6601fc 100644
--- a/recipes-support/nss-pam-ldapd/nss-pam-ldapd_0.9.6.bb
+++ b/recipes-support/nss-pam-ldapd/nss-pam-ldapd_0.9.6.bb
@@ -16,7 +16,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI = "\
http://arthurdejong.org/nss-pam-ldapd/${PN}-${PV}.tar.gz \
- file://nslcd.init\
+ file://nslcd.init \
+ file://nslcd.service \
"
inherit autotools
@@ -45,9 +46,14 @@ do_install_append() {
sed -i -e 's/^uid nslcd/# uid nslcd/;' ${D}${sysconfdir}/nslcd.conf
sed -i -e 's/^gid nslcd/# gid nslcd/;' ${D}${sysconfdir}/nslcd.conf
sed -i -e 's/^base dc=example,dc=com/base ${LDAP_DN}/;' ${D}${sysconfdir}/nslcd.conf
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/nslcd.service ${D}${systemd_unitdir}/system
}
-inherit update-rc.d
+inherit update-rc.d systemd
INITSCRIPT_NAME = "nslcd"
INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "nslcd.service"