From 2eb75f1c13d22616f9b84f801cc935ffaa2434a7 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 26 Jan 2008 17:51:16 +0000 Subject: 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 --- tests/test_nsscmds.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_nsscmds.sh') 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" -- cgit v1.2.3