diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-05-12 12:00:59 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-05-12 12:00:59 +0200 |
commit | 911ef0efb70976bb1b0a95859b4ab8da0d64d5f9 (patch) | |
tree | f0c14707f33a9248d650cfa1e4850fa33295a195 /debian | |
parent | 4786002ae02d8157308eae66abb71d91fc4cf4ac (diff) |
get the first configuration value instead of the last because that one is also written (based on r1567 from 0.8)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.7.15+squeeze@1969 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'debian')
-rw-r--r-- | debian/nslcd.config | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/debian/nslcd.config b/debian/nslcd.config index 2ca8dc8..e5bcba2 100644 --- a/debian/nslcd.config +++ b/debian/nslcd.config @@ -78,7 +78,7 @@ parsecfg() if [ -z "$uris" ] then hosts=`sed -n 's/^host[[:space:]]*//ip' "$cfgfile"` - port=`sed -n 's/^port[[:space:]]*//ip' "$cfgfile" | tail -n 1` + port=`sed -n 's/^port[[:space:]]*//ip' "$cfgfile" | head -n 1` for host in $hosts do if [ -z "$port" ] || (echo "$host" | grep -q ':' ) @@ -95,21 +95,21 @@ parsecfg() db_get nslcd/ldap-base if [ -z "$RET" ] then - searchbase=`sed -n 's/^base[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\1/ip' "$cfgfile" | tail -n 1` + searchbase=`sed -n 's/^base[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\1/ip' "$cfgfile" | head -n 1` [ -n "$searchbase" ] && db_set nslcd/ldap-base "$searchbase" fi # find binddn db_get nslcd/ldap-binddn if [ -z "$RET" ] then - binddn=`sed -n 's/^binddn[[:space:]]*//ip' "$cfgfile" | tail -n 1` + binddn=`sed -n 's/^binddn[[:space:]]*//ip' "$cfgfile" | head -n 1` db_set nslcd/ldap-binddn "$binddn" fi # find bindpw db_get nslcd/ldap-bindpw if [ -z "$RET" ] then - bindpw=`sed -n 's/^bindpw[[:space:]]*//ip' "$cfgfile" | tail -n 1` + bindpw=`sed -n 's/^bindpw[[:space:]]*//ip' "$cfgfile" | head -n 1` db_set nslcd/ldap-bindpw "$bindpw" fi # check ssl option @@ -128,7 +128,7 @@ parsecfg() db_get nslcd/ldap-reqcert if [ -z "$RET" ] then - reqcert=`sed -n 's/^tls_\(reqcert\|checkpeer\)[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\2/ip' "$cfgfile" | tail -n 1` + reqcert=`sed -n 's/^tls_\(reqcert\|checkpeer\)[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\2/ip' "$cfgfile" | head -n 1` # normalise value reqcert=`echo "$reqcert" | tr 'A-Z' 'a-z' | sed 's/^no$/never/;s/^yes$/demand/;s/^hard$/demand/'` [ -n "$reqcert" ] && db_set nslcd/ldap-reqcert "$reqcert" |