diff options
Diffstat (limited to 'debian/patches/contrib')
-rw-r--r-- | debian/patches/contrib/etrn.patch01 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/patches/contrib/etrn.patch01 b/debian/patches/contrib/etrn.patch01 new file mode 100644 index 0000000..616c748 --- /dev/null +++ b/debian/patches/contrib/etrn.patch01 @@ -0,0 +1,42 @@ +--- sendmail-8.12.5/contrib/etrn.pl.mwe Tue Jul 9 11:17:50 2002 ++++ sendmail-8.12.5/contrib/etrn.pl Tue Jul 9 11:33:13 2002 +@@ -81,12 +81,13 @@ + while (<CF>){ + if (/^Fw.*$/){ # look for a line starting with "Fw" + $cwfile = $_; +- chop($cwfile); +- $optional = /^Fw-o/; +- $cwfile =~ s,^Fw[^/]*,,; # extract the file name +- ++ chomp($cwfile); ++ ($optional,$cwfile,$comment_delim) = /^Fw(-o)?\s*(\S*)\s*(?:\s%(.*))?$/; ++ if (!$comment_delim) $comment_delim = '[^#]'; ++ $comment_delim =~ s/[\\](.)/$1/g; # unescape + if (-r $cwfile) { +- push (@cwfiles, $cwfile); ++ push (@cwfiles, {'file' => $cwfile, 'nocomment' => $comment_delim}); ++ + } else { + die "$cwfile is not readable" unless $optional; + } +@@ -103,16 +104,16 @@ + + for $cwfile (@cwfiles) { + $0 = "$av0 - reading $cwfile"; +- if (open(CW, "<$cwfile")){ ++ if (open(CW, "<$cwfile->{'file'}")){ + while (<CW>){ +- next if /^\#/; ++ next unless /^$cwfile->{'nocomment'}/; + $thishost = $_; +- chop($thishost); ++ chomp($thishost); + push(@hosts, $thishost) unless $thishost =~ $hostname; + } + close(CW); + } else { +- die "open $cwfile: $!"; ++ die "open $cwfile->{'file'}: $!"; + } + } + } |