diff options
author | Martin Schulze <joey@infodrom.org> | 2004-09-13 09:07:18 +0200 |
---|---|---|
committer | Andreas Beckmann <debian@abeckmann.de> | 2012-10-01 19:58:43 +0200 |
commit | ae03fe5d926a63cab418207f760d62a947957123 (patch) | |
tree | aa48cfe56ac7c47fb9b0abce4d4689033d3098d6 /debian/patches/contrib/etrn.patch01 | |
parent | dd994db23cb7f88732be927fad3a7039bd6301db (diff) | |
download | sendmail-debian/8.12.3-7.1.tar.gz |
Imported Debian patch 8.12.3-7.1debian/8.12.3-7.1
Diffstat (limited to 'debian/patches/contrib/etrn.patch01')
-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'}: $!"; + } + } + } |