summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-26 15:34:37 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-26 15:34:37 +0000
commit8f568abd1a9883a2c591120baffc847f1f204284 (patch)
tree23ca923c221b962782d43e03db6d1e11322dc3f3 /lib
parentfc74b31b2b30454d91a81c9880c1142a4565e92e (diff)
downloaddrakx-net-8f568abd1a9883a2c591120baffc847f1f204284.tar
drakx-net-8f568abd1a9883a2c591120baffc847f1f204284.tar.gz
drakx-net-8f568abd1a9883a2c591120baffc847f1f204284.tar.bz2
drakx-net-8f568abd1a9883a2c591120baffc847f1f204284.tar.xz
drakx-net-8f568abd1a9883a2c591120baffc847f1f204284.zip
fix reading default squid port (if prefixed by domain, or suffixed by other options)
Diffstat (limited to 'lib')
-rw-r--r--lib/network/squid.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/network/squid.pm b/lib/network/squid.pm
index 0a7dcce..f045b14 100644
--- a/lib/network/squid.pm
+++ b/lib/network/squid.pm
@@ -8,7 +8,7 @@ our $squid_conf_file = "$::prefix/etc/squid/squid.conf";
sub read_squid_conf {
my ($o_file) = @_;
my $s = cat_($o_file || $squid_conf_file);
- { http_port => [ $s =~ /^\s*http_port\s+(.*)/mg ],
+ { http_port => [ $s =~ /^\s*http_port\s+(?:\S+:)?(\d+)\b/mg ],
cache_size => [ if_($s =~ /^\s*cache_dir diskd\s+(.*)/mg, split(' ', $1)) ],
admin_mail => [ if_($s =~ /^\s*err_html_text\s+(.*)/mg, split(' ', $1)) ] };
}