diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-10-18 14:06:49 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-10-18 14:06:49 +0000 |
commit | c713029d4c001ff5f0657f8fabaa865d3aec6b4f (patch) | |
tree | df149874ff0a48d9251bc99cbef541d16f6e5245 /proxy_wizard | |
parent | 4c08d9f8bab5f6416230de744caa7eb3b968a1ea (diff) | |
download | drakwizard-c713029d4c001ff5f0657f8fabaa865d3aec6b4f.tar drakwizard-c713029d4c001ff5f0657f8fabaa865d3aec6b4f.tar.gz drakwizard-c713029d4c001ff5f0657f8fabaa865d3aec6b4f.tar.bz2 drakwizard-c713029d4c001ff5f0657f8fabaa865d3aec6b4f.tar.xz drakwizard-c713029d4c001ff5f0657f8fabaa865d3aec6b4f.zip |
style
Diffstat (limited to 'proxy_wizard')
-rwxr-xr-x | proxy_wizard/Squid.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/proxy_wizard/Squid.pm b/proxy_wizard/Squid.pm index ebcd2dfc..662974fc 100755 --- a/proxy_wizard/Squid.pm +++ b/proxy_wizard/Squid.pm @@ -208,8 +208,7 @@ sub network_mask { sub testport { if (member($o->{var}{wiz_squid_port}, qw(3128 8080))) { return ''; - } - elsif ($o->{var}{wiz_squid_port} <= 1024 || $o->{var}{wiz_squid_port} >= 65536) { + } elsif ($o->{var}{wiz_squid_port} <= 1024 || $o->{var}{wiz_squid_port} >= 65536) { return 'error_low'; } $o->{var}{used_by} = `/bin/grep $o->{var}{wiz_squid_port} /etc/services`; @@ -247,14 +246,12 @@ level = $o->{var}{wiz_squid_level}"); substInFile { s|^\s*#?\s*(http_access\s*)deny(\s*all.*)|#$&\n$1allow$2|; } $file; - } - elsif ($o->{var}{wiz_squid_level} == 2) { + } elsif ($o->{var}{wiz_squid_level} == 2) { substInFile { s|^\s*#?\s*(http_access\s*)allow(\s*all.*)|#$&\n$1deny$2|; s|^\s*#?\s*(http_access\s*allow\s*)localhost|#$&\n$1mynetwork|; } $file; - } - elsif ($o->{var}{wiz_squid_level} == 3) { + } elsif ($o->{var}{wiz_squid_level} == 3) { substInFile { s|^\s*#?\s*(http_access\s*)allow(\s*all.*)|#$&\n$1deny$2|; s|^\s*#?\s*(http_access\s*allow\s*)mynetwork|#$&\n$1localhost|; @@ -267,8 +264,7 @@ level = $o->{var}{wiz_squid_level}"); substInFile { s|^\s*!#\s*(cache_peer.*)|#$&|; } $file; - } - elsif ($o->{var}{wiz_squid_menupeer} == 2 && length $o->{var}{wiz_squid_cachepeer}) { + } elsif ($o->{var}{wiz_squid_menupeer} == 2 && length $o->{var}{wiz_squid_cachepeer}) { if (length($t)) { substInFile { s|^\s*#?\s*(cache_peer.*)|#$&|; |