summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authorFlorin Grad <florin@mandriva.com>2004-01-19 16:47:38 +0000
committerFlorin Grad <florin@mandriva.com>2004-01-19 16:47:38 +0000
commitddc1faa5db1bf747fe9a5813991b4cd3ec4d2654 (patch)
tree200a02b310a8ad933a78f31e4584e8cc5b63de26 /perl-install/network/network.pm
parentf78a3a291053772fb86953c8bb879c817b1cf99a (diff)
downloaddrakx-ddc1faa5db1bf747fe9a5813991b4cd3ec4d2654.tar
drakx-ddc1faa5db1bf747fe9a5813991b4cd3ec4d2654.tar.gz
drakx-ddc1faa5db1bf747fe9a5813991b4cd3ec4d2654.tar.bz2
drakx-ddc1faa5db1bf747fe9a5813991b4cd3ec4d2654.tar.xz
drakx-ddc1faa5db1bf747fe9a5813991b4cd3ec4d2654.zip
add the silly read_squid function
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm8
1 files changed, 8 insertions, 0 deletions
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: $!";