diff options
author | Florin Grad <florin@mandriva.com> | 2004-03-22 15:53:29 +0000 |
---|---|---|
committer | Florin Grad <florin@mandriva.com> | 2004-03-22 15:53:29 +0000 |
commit | 8617cbbb9e016748cb60fffccab13cfc7fc5ded9 (patch) | |
tree | 27acefd6cfd3bfd2328721c48da0ac80d1ac4a77 /perl-install/network | |
parent | e53bb72e700808aefd6c0986ddd55cccc7906804 (diff) | |
download | drakx-backup-do-not-use-8617cbbb9e016748cb60fffccab13cfc7fc5ded9.tar drakx-backup-do-not-use-8617cbbb9e016748cb60fffccab13cfc7fc5ded9.tar.gz drakx-backup-do-not-use-8617cbbb9e016748cb60fffccab13cfc7fc5ded9.tar.bz2 drakx-backup-do-not-use-8617cbbb9e016748cb60fffccab13cfc7fc5ded9.tar.xz drakx-backup-do-not-use-8617cbbb9e016748cb60fffccab13cfc7fc5ded9.zip |
do not write the REDIRECT squid rules if one has only one NIC connected to the net zone
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/shorewall.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm index 01ed2f422..06b0efa09 100644 --- a/perl-install/network/shorewall.pm +++ b/perl-install/network/shorewall.pm @@ -140,7 +140,7 @@ sub write { map_each { [ 'ACCEPT', $_, 'fw', $::a, join(',', @$::b), '-' ] } %ports_by_proto } ('net', if_($conf->{loc_interface}[0], 'loc'))), ); - if (cat_("/etc/shorewall/rules") !~ /^\s*REDIRECT\s*loc\s*$squid_port\s+(\S+)/mg && $squid_port && -f "/var/run/squid.pid") { + if (cat_("/etc/shorewall/rules") !~ /^\s*REDIRECT\s*loc\s*$squid_port\s+(\S+)/mg && $squid_port && -f "/var/run/squid.pid" && grep { /Loc/i} cat_("/etc/shorewall/zones")) { substInFile { s/#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE/REDIRECT\tloc\t$squid_port\ttcp\twww\t-\nACCEPT\tfw\tnet\ttcp\twww\n#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE/; } "/etc/shorewall/rules" |