From 8f568abd1a9883a2c591120baffc847f1f204284 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 26 Mar 2008 15:34:37 +0000 Subject: fix reading default squid port (if prefixed by domain, or suffixed by other options) --- lib/network/squid.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/network/squid.pm') 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)) ] }; } -- cgit v1.2.1