From ddc1faa5db1bf747fe9a5813991b4cd3ec4d2654 Mon Sep 17 00:00:00 2001 From: Florin Grad Date: Mon, 19 Jan 2004 16:47:38 +0000 Subject: add the silly read_squid function --- perl-install/network/network.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'perl-install') diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 1d440e97b..32ac99a63 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -64,6 +64,14 @@ sub read_dhcpd_conf { max_lease_time => [ if_(cat_($file) =~ /^\s*max-lease-time\s+(.*);/m, split(' ', $1)) ] }; } +sub read_squid_conf { + my ($file) = @_; + $file ||= "$::prefix/etc/squid/squid.conf"; + { http_port => [ cat_($file) =~ /^\s*http_port\s+(.*)/mg ], + cache_size => [ if_(cat_($file) =~ /^\s*cache_dir diskd\s+(.*)/mg, split(' ', $1)) ], + admin_mail => [ if_(cat_($file) =~ /^\s*err_html_text\s+(.*)/mg, split(' ', $1)) ] }; +} + sub read_tmdns_conf { my ($file) = @_; local *F; open F, $file or die "cannot open file $file: $!"; -- cgit v1.2.1