tags 637863 + patch
thanks

Hi,

after debugging this issue a bit more, I found the cause for the
described empty 'uri'-declaration.  The reason are leading/trailing 
whitspaces which might be part of the debconf value.  These should 
be removed before splitting the uris into lines containing the
indiviual URLs.

Testscript:

uris=" ldap://ldap ldap://test "
echo "$uris" | sed 's/^[ \t]*//;s/[ \t]*$//;s/  */\n/g' | while read uri; do 
echo "new: $uri";done
echo "$uris" | sed                         's/  */\n/g' | while read uri; do 
echo "old: $uri";done

Best regards,

     Andi
--- nss-pam-ldapd-0.7.13/debian/nslcd.postinst_orig     2011-08-29 
14:39:19.000000000 +0200
+++ nss-pam-ldapd-0.7.13/debian/nslcd.postinst  2011-08-29 14:40:00.000000000 
+0200
@@ -62,7 +62,7 @@
   # escape all uri directives
   sed -i 's/^uri /_uri_ /i' $CONFFILE
   # set the uri options
-  echo "$uris" | sed 's/  */\n/g' | while read uri
+  echo "$uris" | sed 's/^[ \t]*//;s/[ \t]*$//;s/  */\n/g' | while read uri
   do
     if grep -qi '^_uri_ ' $CONFFILE
     then

Reply via email to