summaryrefslogtreecommitdiffstats
path: root/core/modules/nslcd
diff options
context:
space:
mode:
authorSebastian2016-04-25 12:01:08 +0200
committerSebastian2016-04-25 12:01:08 +0200
commit5acda3eaeabae9045609539303a8c12c4ce401f1 (patch)
tree7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/nslcd
parentinitial commit (diff)
downloadmltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz
mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip
merge with latest dev version
Diffstat (limited to 'core/modules/nslcd')
-rw-r--r--core/modules/nslcd/module.build42
-rw-r--r--core/modules/nslcd/module.conf6
-rw-r--r--core/modules/nslcd/module.conf.debian6
-rw-r--r--core/modules/nslcd/module.conf.ubuntu6
-rw-r--r--core/modules/nslcd/templates/nslcd-systemd.service8
5 files changed, 68 insertions, 0 deletions
diff --git a/core/modules/nslcd/module.build b/core/modules/nslcd/module.build
new file mode 100644
index 00000000..76fa2bed
--- /dev/null
+++ b/core/modules/nslcd/module.build
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+fetch_source() {
+ if [ -n "$REQUIRED_NSS_LDAPD_URL" ]; then
+ pinfo "Downloading $REQUIRED_NSS_LDAPD_URL ..."
+ download_untar "$REQUIRED_NSS_LDAPD_URL" "src/"
+ fi
+}
+
+build() {
+
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+ # OpenSuSE 13.1 has no 'nss-pam-ldapd'. Let's compile
+ if [ -n "$REQUIRED_NSS_LDAPD_URL" ]; then
+ cd "${MODULE_WORK_DIR}/src/$REQUIRED_NSS_LDAPD_VERSION"
+ pinfo "compiling pam-nss-ldapd for openSuse 13.1 ..."
+ ./configure || perror "openSuse 13.1 - pam-nss-ldapd: ./configure failed."
+ make DESTDIR="${MODULE_BUILD_DIR}" install || perror "openSuse 13.1 - pam-nss-ldapd: make install to ${MODULE_BUILD_DIR} failed."
+ cd "$MODULE_BUILD_DIR"
+ local NSLCD_PATH=$(find . -executable -name "nslcd") # Not in path, so we 'find' below MODULE_BUILD_DIR
+ else
+ cd "$MODULE_BUILD_DIR"
+ local NSLCD_PATH=$(which nslcd)
+ fi
+ [[ $REQUIRED_BINARIES = *nslcd* ]] && [ -z "$NSLCD_PATH" ] && perror "Could not 'which nslcd'"
+
+
+ # Build nslcd service file
+ mkdir -p "${MODULE_BUILD_DIR}/etc/systemd/system"
+ sed "s,%PATH%,${NSLCD_PATH},g" "${MODULE_DIR}/templates/nslcd-systemd.service" > "${MODULE_BUILD_DIR}/etc/systemd/system/nslcd.service" || perror "Could not fill nslcd.service template"
+
+ return 0
+}
+
+post_copy() {
+ :
+}
diff --git a/core/modules/nslcd/module.conf b/core/modules/nslcd/module.conf
new file mode 100644
index 00000000..7dae2ba1
--- /dev/null
+++ b/core/modules/nslcd/module.conf
@@ -0,0 +1,6 @@
+REQUIRED_BINARIES="
+ nslcd
+"
+REQUIRED_FILES="
+ /etc/systemd/system/nslcd.service
+"
diff --git a/core/modules/nslcd/module.conf.debian b/core/modules/nslcd/module.conf.debian
new file mode 100644
index 00000000..3d83fc81
--- /dev/null
+++ b/core/modules/nslcd/module.conf.debian
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ nslcd
+"
+REQUIRED_CONTENT_PACKAGES="
+ nslcd
+"
diff --git a/core/modules/nslcd/module.conf.ubuntu b/core/modules/nslcd/module.conf.ubuntu
new file mode 100644
index 00000000..3d83fc81
--- /dev/null
+++ b/core/modules/nslcd/module.conf.ubuntu
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+ nslcd
+"
+REQUIRED_CONTENT_PACKAGES="
+ nslcd
+"
diff --git a/core/modules/nslcd/templates/nslcd-systemd.service b/core/modules/nslcd/templates/nslcd-systemd.service
new file mode 100644
index 00000000..540e67cd
--- /dev/null
+++ b/core/modules/nslcd/templates/nslcd-systemd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Naming services LDAP client daemon
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/nslcd/nslcd.pid
+ExecStart=%PATH%