lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1741 - debian/nss-pam-ldapd/trunk/debian

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1741 - debian/nss-pam-ldapd/trunk/debian



Author: arthur
Date: Fri Aug 31 23:41:13 2012
New Revision: 1741
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1741&view=revision

Log:
use a more readable (but longer) regular expression to match maps

Modified:
   debian/nss-pam-ldapd/trunk/debian/nslcd.config
   debian/nss-pam-ldapd/trunk/debian/nslcd.postinst

Modified: debian/nss-pam-ldapd/trunk/debian/nslcd.config
==============================================================================
--- debian/nss-pam-ldapd/trunk/debian/nslcd.config      Fri Aug 31 17:06:46 
2012        (r1740)
+++ debian/nss-pam-ldapd/trunk/debian/nslcd.config      Fri Aug 31 23:41:13 
2012        (r1741)
@@ -30,7 +30,7 @@
   db_get "$debconf_param"
   debconf_value="$RET"
   # the first part avoids getting options that have an option MAP parameter
-  cfgfile_value=`sed -n 
'/^'"$cfg_param"'[[:space:]]*[aeghnprs][acedgihklopsrutwv]*[[:space:]]/!s/^'"$cfg_param"'[[:space:]]*\([^[:space:]].*[^[:space:]]\)[[:space:]]*$/\1/ip'
 "$cfgfile" | head -n 1`
+  cfgfile_value=`sed -n 
'/^'"$cfg_param"'[[:space:]]\(aliases\|ethers\|group\|hosts\|netgroup\|networks\|passwd\|protocols\|rpc\|services\|shadow\)[[:space:]]/!s/^'"$cfg_param"'[[:space:]]*\([^[:space:]].*[^[:space:]]\)[[:space:]]*$/\1/ip'
 "$cfgfile" | head -n 1`
   [ -n "$cfgfile_value" ] && [ "$debconf_value" != "$cfgfile_value" ] && 
db_set "$debconf_param" "$cfgfile_value"
   # we're done
   return 0

Modified: debian/nss-pam-ldapd/trunk/debian/nslcd.postinst
==============================================================================
--- debian/nss-pam-ldapd/trunk/debian/nslcd.postinst    Fri Aug 31 17:06:46 
2012        (r1740)
+++ debian/nss-pam-ldapd/trunk/debian/nslcd.postinst    Fri Aug 31 23:41:13 
2012        (r1741)
@@ -11,7 +11,7 @@
   parameter="$1"
   value="$2"
   # check if the parameter is defined
-  line=`sed -n 
'/^'"$parameter"'[[:space:]]*[aeghnprs][acedgihklopsrutwv]*[[:space:]]/d;/^'"$parameter"'[[:space:]]/p'
 "$CONFFILE" | head -n 1`
+  line=`sed -n 
'/^'"$parameter"'[[:space:]]*\(aliases\|ethers\|group\|hosts\|netgroup\|networks\|passwd\|protocols\|rpc\|services\|shadow\)[[:space:]]/d;/^'"$parameter"'[[:space:]]/p'
 "$CONFFILE" | head -n 1`
   if [ -z "$line" ]
   then
     # check if the parameter is commented out
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/