Hi.
I think that this time this patch better corrects the issue.
Any comments welcome (and maybe some feedback from maintainer ? ;)
Best regards,
--
Olivier BERGER <[EMAIL PROTECTED]>
Ingénieur Recherche - Dept INF
INT Evry (http://www.int-evry.fr)
OpenPGP-Id: 1024D/6B829EEC
--- libnss-ldap.postinst.orig 2006-12-15 16:17:26.000000000 +0100
+++ libnss-ldap.postinst 2006-12-15 18:10:41.000000000 +0100
@@ -30,15 +30,16 @@
if [ "$notthere" = "1" ]; then
add_missing $parameter $value
else
- replacestring="^$parameter .*"
- if [ "$commented" = "1" ]; then
- replacestring="^# *$parameter .*"
- fi
# i really need a better way to do this...
# currently we replace only the first match, we need a better
# way of dealing with multiple hits.
+ if [ "$commented" = "1" ]; then
value="$value" parameter="$parameter" perl -i -p -e 's/^# *\Q$ENV{"parameter"}\E .*/$ENV{"parameter"} $ENV{"value"}/i
and $match=1 unless ($match)' $CONFFILE
+ else
+ value="$value" parameter="$parameter" perl -i -p -e 's/^\Q$ENV{"parameter"}\E .*/$ENV{"parameter"} $ENV{"value"}/i
+ and $match=1 unless ($match)' $CONFFILE
+ fi
fi
}