]> git.sur5r.net Git - openldap/commitdiff
cleanup slapd.ldif; install it (ITS#7015)
authorPierangelo Masarati <ando@OpenLDAP.org>
Thu, 11 Aug 2011 15:33:08 +0000 (17:33 +0200)
committerPierangelo Masarati <ando@OpenLDAP.org>
Thu, 11 Aug 2011 15:34:29 +0000 (17:34 +0200)
servers/slapd/Makefile.in
servers/slapd/slapd.ldif

index 12ba1dc30b444758eadb945ce9058a58fb4f59ad..b1bdfc7b3c148a81e988d28f33ab9f8ca5648894 100644 (file)
@@ -399,6 +399,10 @@ all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) dynamic_overlays
                -e "s;%LOCALSTATEDIR%;$$localstatedir;" \
                -e "s;%MODULEDIR%;$$moduledir;" \
                $(srcdir)/slapd.conf > slapd.conf.tmp ; \
+       $(SED) -e "s;%SYSCONFDIR%;$$sysconfdir;" \
+               -e "s;%LOCALSTATEDIR%;$$localstatedir;" \
+               -e "s;%MODULEDIR%;$$moduledir;" \
+               $(srcdir)/slapd.ldif > slapd.ldif.tmp ; \
        touch all-cffiles
 
 install-schema: FORCE
@@ -424,6 +428,14 @@ install-conf: FORCE
        else \
                echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/slapd.conf" ; \
        fi
+       $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif.default
+       if test ! -f $(DESTDIR)$(sysconfdir)/slapd.ldif; then \
+               echo "installing slapd.ldif in $(sysconfdir)"; \
+               echo "$(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif"; \
+               $(INSTALL) $(INSTALLFLAGS) -m 600 slapd.ldif.tmp $(DESTDIR)$(sysconfdir)/slapd.ldif; \
+       else \
+               echo "PRESERVING EXISTING CONFIGURATION FILE $(DESTDIR)$(sysconfdir)/slapd.ldif" ; \
+       fi
 
 install-db-config: FORCE
        @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
index 0a77598d52d5b644658137828aa32d4d55257459..4998f06eacdc8ce3aa871de16396dd8ee3ad79a6 100644 (file)
@@ -9,8 +9,8 @@ cn: config
 #
 # Define global ACLs to disable default read access.
 #
-olcArgsFile:   %LOCALSTATEDIR%/run/slapd.args
-olcPidFile:            %LOCALSTATEDIR%/run/slapd.pid
+olcArgsFile: %LOCALSTATEDIR%/run/slapd.args
+olcPidFile: %LOCALSTATEDIR%/run/slapd.pid
 #
 # Do not enable referrals until AFTER you have a working directory
 # service AND an understanding of referrals.
@@ -41,7 +41,7 @@ dn: cn=schema,cn=config
 objectClass: olcSchemaConfig
 cn: schema
 
-include:               file:///%SYSCONFDIR%/schema/core.ldif
+include: file://%SYSCONFDIR%/schema/core.ldif
 
 # Frontend settings
 #
@@ -80,15 +80,15 @@ dn: olcDatabase=bdb,cn=config
 objectClass: olcDatabaseConfig
 objectClass: olcBdbConfig
 olcDatabase: bdb
-olcSuffix:             dc=my-domain,dc=com
-olcRootDN:             cn=Manager,dc=my-domain,dc=com
+olcSuffix: dc=my-domain,dc=com
+olcRootDN: cn=Manager,dc=my-domain,dc=com
 # Cleartext passwords, especially for the rootdn, should
 # be avoided.  See slappasswd(8) and slapd-config(5) for details.
 # Use of strong authentication encouraged.
-olcRootPW:             secret
+olcRootPW: secret
 # The database directory MUST exist prior to running slapd AND 
 # should only be accessible by the slapd and slap tools.
 # Mode 700 recommended.
 olcDbDirectory:        %LOCALSTATEDIR%/openldap-data
 # Indices to maintain
-olcDbIndex:    objectClass     eq
+olcDbIndex: objectClass eq