Skip to content

Commit

Permalink
Fix NFS issue
Browse files Browse the repository at this point in the history
Add directory detection for NFS.
  • Loading branch information
cetsupport authored Dec 1, 2017
1 parent e55a7ce commit 91d9533
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions image/service/slapd/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ if [ ! -e "$FIRST_START_DONE" ]; then
# database and config directory are empty
# setup bootstrap config - Part 1
#
if [ -z "$(ls -A -I lost+found /var/lib/ldap)" ] && [ -z "$(ls -A -I lost+found /etc/ldap/slapd.d)" ]; then
if [ -z "$(ls -A -I lost+found -I .rmtab /var/lib/ldap)" ] && [ -z "$(ls -A -I lost+found -I .rmtab /etc/ldap/slapd.d)" ]; then

BOOTSTRAP=true
log-helper info "Database and config directory are empty..."
Expand Down Expand Up @@ -127,14 +127,14 @@ EOF
#
# Error: the database directory (/var/lib/ldap) is empty but not the config directory (/etc/ldap/slapd.d)
#
elif [ -z "$(ls -A -I lost+found /var/lib/ldap)" ] && [ ! -z "$(ls -A -I lost+found /etc/ldap/slapd.d)" ]; then
elif [ -z "$(ls -A -I lost+found -I .rmtab /var/lib/ldap)" ] && [ ! -z "$(ls -A -I lost+found -I .rmtab /etc/ldap/slapd.d)" ]; then
log-helper error "Error: the database directory (/var/lib/ldap) is empty but not the config directory (/etc/ldap/slapd.d)"
exit 1

#
# Error: the config directory (/etc/ldap/slapd.d) is empty but not the database directory (/var/lib/ldap)
#
elif [ ! -z "$(ls -A -I lost+found /var/lib/ldap)" ] && [ -z "$(ls -A -I lost+found /etc/ldap/slapd.d)" ]; then
elif [ ! -z "$(ls -A -I lost+found -I .rmtab /var/lib/ldap)" ] && [ -z "$(ls -A -I lost+found -I .rmtab /etc/ldap/slapd.d)" ]; then
log-helper error "Error: the config directory (/etc/ldap/slapd.d) is empty but not the database directory (/var/lib/ldap)"
exit 1
fi
Expand Down

0 comments on commit 91d9533

Please sign in to comment.