[arch-commits] Commit in openldap/trunk (PKGBUILD slapd)

Eric Bélanger eric at archlinux.org
Thu Jul 21 15:25:21 EDT 2011


    Date: Thursday, July 21, 2011 @ 15:25:21
  Author: eric
Revision: 132232

Moved /run/openldap creation to daemon script

Modified:
  openldap/trunk/PKGBUILD
  openldap/trunk/slapd

----------+
 PKGBUILD |   13 +++----------
 slapd    |    1 +
 2 files changed, 4 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-07-21 17:21:32 UTC (rev 132231)
+++ PKGBUILD	2011-07-21 19:25:21 UTC (rev 132232)
@@ -12,7 +12,7 @@
 source=(ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${pkgbase}-${pkgver}.tgz
         slapd slapd.default ntlm.patch)
 md5sums=('f36f3086031dd56ae94f722ffae8df5e'
-         '7ea596cc1d6cbcfe1deea29ec66ab317'
+         '40fdbdd6c343019cbadf4eb26c6189f2'
          '6be69f6b7e522cb64cce8703da81ed32'
          '4258ddbef923d1f29f2843bc050f8c56')
 
@@ -84,18 +84,11 @@
 
   ln -s ../lib/slapd "${pkgdir}"/usr/sbin/slapd
 
-  install -dm700 "${pkgdir}"/var/lib/openldap
-  chown -R 439:439 "${pkgdir}"/var/lib/openldap
-
-  install -dm755 "${pkgdir}"/run/openldap
-  chown 439:439 "${pkgdir}"/run/openldap
-
   chown root:439 "${pkgdir}"/etc/openldap/{slapd.conf,DB_CONFIG.example}
   chmod 640 "${pkgdir}"/etc/openldap/{slapd.conf,DB_CONFIG.example}
 
-  install -dm700 "${pkgdir}"/etc/openldap/slapd.d
-  chown 439:439 "${pkgdir}"/etc/openldap/slapd.d
-
+  install -dm700 -o 439 -g 439 "${pkgdir}"/var/lib/openldap
+  install -dm700 -o 439 -g 439 "${pkgdir}"/etc/openldap/slapd.d
   install -Dm755 "${srcdir}"/slapd "${pkgdir}"/etc/rc.d/slapd
   install -Dm644 "${srcdir}"/slapd.default "${pkgdir}"/etc/conf.d/slapd
   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE

Modified: slapd
===================================================================
--- slapd	2011-07-21 17:21:32 UTC (rev 132231)
+++ slapd	2011-07-21 19:25:21 UTC (rev 132232)
@@ -9,6 +9,7 @@
 case "$1" in
   start)
     stat_busy "Starting OpenLDAP"
+    [ ! -d /run/openldap ] && install -d -m755 -o ldap -g ldap /run/openldap
     if [ -z "$PID" ]; then
       if [ -z "$SLAPD_SERVICES" ]; then
         /usr/sbin/slapd -u ldap -g ldap $SLAPD_OPTIONS



More information about the arch-commits mailing list