aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-07-30 18:16:53 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-07-31 11:56:48 -0400
commit48186eb4a0e6d680f558b4a98e6ae48a9c7223bd (patch)
tree0cba433ec9987ba8c34d09bcdcb062c6a7c6172b
parente2fe95121b530553929aa7d4ef60a3e63ebfc6c0 (diff)
downloadmeta-cloud-services-48186eb4a0e6d680f558b4a98e6ae48a9c7223bd.tar.gz
meta-cloud-services-48186eb4a0e6d680f558b4a98e6ae48a9c7223bd.tar.bz2
meta-cloud-services-48186eb4a0e6d680f558b4a98e6ae48a9c7223bd.zip
openldap: Fix paths
Explicitly set the libexec dir to /usr/libexec for openstack Signed-off-by: Amy Fong <amy.fong@windriver.com>
-rw-r--r--meta-openstack/recipes-support/openldap/files/initscript2
-rw-r--r--meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend11
2 files changed, 10 insertions, 3 deletions
diff --git a/meta-openstack/recipes-support/openldap/files/initscript b/meta-openstack/recipes-support/openldap/files/initscript
index f9c343a..51bdeff 100644
--- a/meta-openstack/recipes-support/openldap/files/initscript
+++ b/meta-openstack/recipes-support/openldap/files/initscript
@@ -6,7 +6,7 @@
#
-slapd=/usr/libexec/slapd
+slapd=%LIBEXEC%/slapd
test -x "$slapd" || exit 0
src_data_dir=/etc/openldap/
diff --git a/meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend b/meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend
index d8166ce..3f9fc7d 100644
--- a/meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend
+++ b/meta-openstack/recipes-support/openldap/openldap_2.4.39.bbappend
@@ -10,10 +10,15 @@ SRC_URI += "file://ops-base.ldif"
LDAP_DN ?= "dc=my-domain,dc=com"
LDAP_DATADIR ?= "/etc/openldap-data/"
+OPENLDAP_LIBEXECDIR = "/usr/libexec"
+
+EXTRA_OECONF += "--libexecdir=${OPENLDAP_LIBEXECDIR}"
+
do_install_append() {
install -D -m 0755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/openldap
sed -i -e 's/%DEFAULT_DN%/${LDAP_DN}/g' ${D}${sysconfdir}/init.d/openldap
sed -i -e 's#%LDAP_DATADIR%#${LDAP_DATADIR}#g' ${D}${sysconfdir}/init.d/openldap
+ sed -i -e 's#%LIBEXEC%#${OPENLDAP_LIBEXECDIR}#g' ${D}${sysconfdir}/init.d/openldap
# This is duplicated in /etc/openldap and is for slapd
rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example
@@ -21,7 +26,7 @@ do_install_append() {
rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
# remove symlinks for backends, recreating in postinstall
- rm ${D}/${libexecdir}/openldap/*.so
+ rm -f ${D}/${OPENLDAP_LIBEXECDIR}/openldap/*.so
sed -i -e '/^include\s*/a \
include /etc/openldap/schema/cosine.schema \
@@ -31,7 +36,7 @@ include /etc/openldap/schema/misc.schema' \
${D}/etc/openldap/slapd.conf
sed -i -e '/^# Load dynamic backend modules:/a \
-modulepath /usr/libexec/openldap \
+modulepath ${OPENLDAP_LIBEXECDIR}/openldap \
moduleload back_bdb.la' \
${D}/etc/openldap/slapd.conf
@@ -65,3 +70,5 @@ inherit update-rc.d
INITSCRIPT_NAME = "openldap"
INITSCRIPT_PARAMS = "defaults"
+FILES_${PN} += "${OPENLDAP_LIBEXECDIR}/*"
+FILES_${PN}-dbg += "${OPENLDAP_LIBEXECDIR}/openldap/.debug ${OPENLDAP_LIBEXECDIR}/.debug"