summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2011-11-18 13:24:23 +0000
committerArthur de Jong <arthur@arthurdejong.org>2011-11-18 13:24:23 +0000
commitfd57baf6917a6b4e5754de3eb6e00126f2f1fb6c (patch)
treef07f61ce7d6bb9330b37c532d745fdd26bf2a5ad
parent6ceea82dabd2f8a4d3bafcfd892e0e1c862a12bd (diff)
simplification of logic to overwrite list of enabled /etc/nsswitch.conf services in debconf (based on r1555 of 0.7 branch)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1556 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--debian/libnss-ldapd.config16
1 files changed, 4 insertions, 12 deletions
diff --git a/debian/libnss-ldapd.config b/debian/libnss-ldapd.config
index 2d759e8..0f2f477 100644
--- a/debian/libnss-ldapd.config
+++ b/debian/libnss-ldapd.config
@@ -22,18 +22,10 @@ nss_list_configured()
/etc/nsswitch.conf
}
-# parse /etc/nsswitch.conf and see which services have ldap specified
-db_get libnss-ldapd/nsswitch
-# find name services that currently use LDAP
-configured=`nss_list_configured`
-# separate by commas
-configured=`echo $configured | sed 's/[[:space:]][[:space:]]*/, /g'`
-# store configured services either on first config or when ldap is already
-# configured
-if [ -z "$RET" ] || [ -n "$configured" ]
-then
- db_set libnss-ldapd/nsswitch "$configured"
-fi
+# find name services that currently use LDAP and separate by commas
+configured=`nss_list_configured | sed 's/[[:space:]][[:space:]]*/, /g'`
+# store configured services when ldap is already configured
+[ -n "$configured" ] && db_set libnss-ldapd/nsswitch "$configured"
#
# This is the second part of the script. In this part the configurable