summaryrefslogtreecommitdiffstats
path: root/roles/common-LDAP/files
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-06-05 18:30:39 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:54:30 +0200
commit47bc2f8d305f6d14b7f61334bf328447b4f7319d (patch)
tree079ba80ce438204b159b4401f36fc69d3815aabf /roles/common-LDAP/files
parent737ad6a732752ed277954db6d1a562a817adca91 (diff)
Change slapd dump filenames.
E.g., ‘0.ldif’ → ‘slapd-0.ldif’.
Diffstat (limited to 'roles/common-LDAP/files')
-rwxr-xr-xroles/common-LDAP/files/usr/local/sbin/slapcat-all.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh b/roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh
index 4e5b5e4..8aa8f78 100755
--- a/roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh
+++ b/roles/common-LDAP/files/usr/local/sbin/slapcat-all.sh
@@ -9,10 +9,11 @@ PATH=/usr/sbin:/sbin:/usr/bin:/bin
target="$1"
umask 0077
-slapcat -n0 -l"$target/0.ldif"
-n=$(grep -Ec '^dn:\s+olcDatabase={[1-9][0-9]*}' "$target/0.ldif")
+prefix=slapd-
+slapcat -n0 -l"$target/${prefix}0.ldif"
+n=$(grep -Ec '^dn:\s+olcDatabase={[1-9][0-9]*}' "$target/${prefix}0.ldif")
while [ $n -gt 0 ]; do
- slapcat -n$n -l"$target/$n.ldif"
+ slapcat -n$n -l"$target/${prefix}$n.ldif"
n=$(( $n - 1 ))
done