Sometimes configuring gets complicated, e.g. the BLACKLISTS
item in esmtpd, which changes quite often. I set it with
something like

  ALIST="-block=blah..."
  ANOTHER="-block=..."
  # and then
  BLACKLISTS="$ALIST $ANOTHER"

Sysconftool silently discards anything after the first line.

OTOH, the patch attached would keep the tail of a dist comment
when a user just uncomments a proposed setting before it...
--- courier/sysconftool 2005-09-17 05:06:41.000000000 +0200
+++ sysconftool 2006-07-31 20:35:53.722173960 +0200
@@ -101,11 +101,10 @@
        {
            if ($line =~ /^\#/)
            {
-               $configname=$configversion="" if $resetflag;
-               $resetflag=0;
-
                if ($line =~ /^\#\#NAME:(.*):(.*)/)
                {
+                   $resetflag=0;
+
                    ($configname, $configversion)=($1, $2);
                    
                    $configname =~ s/[ \t]//g;
@@ -117,9 +116,10 @@
            else
            {
                $resetflag=1;
-               $old_settings{$configname} .= $line
-                   if $configname;
            }
+
+           $old_settings{$configname} .= $line
+               if $configname && $resetflag;
        }
        $oldfile=undef;
     }
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to