diff options
| author | Florian Boor <florian.boor@kernelconcepts.de> | 2006-06-19 21:33:47 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-06-19 21:33:47 +0000 |
| commit | d8aaeca2ad195be3be0bde2ffccf371184d00a70 (patch) | |
| tree | f8e2488cc3987338968661769699773654e13247 /packages/openldap | |
| parent | a92f4b1b919577821c18e65ea0a6ade1cfddc8a2 (diff) | |
| parent | cccc0c41c26272f9df82ddd32e58c1fd33a1aef2 (diff) | |
merge of 67ad681c17b58ee0ff1e672b4aa634ab523a9e11
and f964e908fbdc16f8a354efde04a6cd7a81ce0a6a
Diffstat (limited to 'packages/openldap')
| -rw-r--r-- | packages/openldap/files/initscript | 29 | ||||
| -rw-r--r-- | packages/openldap/openldap_2.3.11.bb | 20 |
2 files changed, 48 insertions, 1 deletions
diff --git a/packages/openldap/files/initscript b/packages/openldap/files/initscript new file mode 100644 index 0000000000..40881cd6d7 --- /dev/null +++ b/packages/openldap/files/initscript @@ -0,0 +1,29 @@ +#! /bin/sh +# +# This is an init script for openembedded +# Copy it to /etc/init.d/openldap and type +# > update-rc.d openldap defaults 60 +# + + +slapd=/usr/libexec/slapd +test -x "$slapd" || exit 0 + + +case "$1" in + start) + echo -n "Starting OpenLDAP: " + start-stop-daemon --start --quiet --exec $slapd + echo "." + ;; + stop) + echo -n "Stopping OpenLDAP: " + start-stop-daemon --stop --quiet --pidfile /var/run/slapd.pid + echo "." + ;; + *) + echo "Usage: /etc/init.d/openldap {start|stop}" + exit 1 +esac + +exit 0
\ No newline at end of file diff --git a/packages/openldap/openldap_2.3.11.bb b/packages/openldap/openldap_2.3.11.bb index f15de41116..26d017fb1e 100644 --- a/packages/openldap/openldap_2.3.11.bb +++ b/packages/openldap/openldap_2.3.11.bb @@ -12,12 +12,13 @@ PRIORITY = "optional" LICENSE = "OpenLDAP" SECTION = "libs" -PR = "r1" +PR = "r2" LDAP_VER = "${@'.'.join(bb.data.getVar('PV',d,1).split('.')[0:2])}" SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz" SRC_URI += "file://openldap-m4-pthread.patch;patch=1" +SCR-URI += "file://initscript"; # The build tries to run a host executable, this fails. The patch # causes the executable and its data to be installed instead of # the output - ucgendat must be run after the ipkg install! @@ -263,6 +264,23 @@ FILES_${PN}-bin = "${bindir}" FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la ${libdir}/*.a ${libexecdir}/openldap/*.a" do_install_append() { + install -d ${D}${sysconfdir}/init.d + cat ${WORKDIR}/initscript > ${D}${sysconfdir}/init.d/openldap + chmod 755 ${D}${sysconfdir}/init.d/openldap # This is duplicated in /etc/openldap and is for slapd rm -f ${D}${localstatedir}/openldap-data/DB_CONFIG.example } + +pkg_postinst () { + if test -n "${D}"; then + D="-r $D" + fi + update-rc.d $D acpid defaults +} + +pkg_prerm () { + if test -n "${D}"; then + D="-r $D" + fi + update-rc.d $D acpid remove +} |
