Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/test_nsscmds.sh
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2008-01-26 18:51:16 +0100
committerArthur de Jong <arthur@arthurdejong.org>2008-01-26 18:51:16 +0100
commit2eb75f1c13d22616f9b84f801cc935ffaa2434a7 (patch)
tree7c189058bd4dc1b9a2180fc2363a2b0b2fdeb616 /tests/test_nsscmds.sh
parentec105f28b533504725af9510c4ea0b189b427a18 (diff)
handle the case where /etc/nss-ldapd.conf does not exist a little more graceful
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@568 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'tests/test_nsscmds.sh')
-rwxr-xr-xtests/test_nsscmds.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_nsscmds.sh b/tests/test_nsscmds.sh
index fe59a87..3b8ad84 100755
--- a/tests/test_nsscmds.sh
+++ b/tests/test_nsscmds.sh
@@ -30,6 +30,12 @@ set -e
# check if LDAP is configured correctly
cfgfile="/etc/nss-ldapd.conf"
+if ! [ -r "$cfgfile" ]
+then
+ echo "test_nsscmds.sh: $cfgfile: not found"
+ exit 77
+fi
+
uri=`sed -n 's/^uri *//p' "$cfgfile" | head -n 1`
base="dc=test,dc=tld"