summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-09 02:57:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-09 02:57:49 +0000
commit6bc41c18be44b8a6d8abf8cbc40be9af2c31e9aa (patch)
tree9c3cc620ddbb2e6671c85a4e3d64f0e6ff029c35 /perl-install
parente53f7320939609ff710a24ae23fc8cc77ca300e7 (diff)
downloaddrakx-backup-do-not-use-6bc41c18be44b8a6d8abf8cbc40be9af2c31e9aa.tar
drakx-backup-do-not-use-6bc41c18be44b8a6d8abf8cbc40be9af2c31e9aa.tar.gz
drakx-backup-do-not-use-6bc41c18be44b8a6d8abf8cbc40be9af2c31e9aa.tar.bz2
drakx-backup-do-not-use-6bc41c18be44b8a6d8abf8cbc40be9af2c31e9aa.tar.xz
drakx-backup-do-not-use-6bc41c18be44b8a6d8abf8cbc40be9af2c31e9aa.zip
perl_checker compliance + cleanup
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/network.pm28
1 files changed, 14 insertions, 14 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 06e86155c..83e6d15a4 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -53,23 +53,23 @@ sub read_interface_conf {
}
sub read_dhcpd_conf {
- my ($file) = @_;
- $file ||= "$::prefix/etc/dhcpd.conf";
- { option_routers => [ cat_($file) =~ /^\s*option routers\s+(\S+);/mg ],
- subnet_mask => [ if_(cat_($file) =~ /^\s*option subnet-mask\s+(.*);/mg, split(' ', $1)) ],
- domain_name => [ if_(cat_($file) =~ /^\s*option domain-name\s+"(.*)";/mg, split(' ', $1)) ],
- domain_name_servers => [ if_(cat_($file) =~ /^\s*option domain-name-servers\s+(.*);/m, split(' ', $1)) ],
- dynamic_bootp => [ if_(cat_($file) =~ /^\s*range dynamic-bootp\s+\S+\.(\d+)\s+\S+\.(\d+)\s*;/m, split(' ', $1)) ],
- default_lease_time => [ if_(cat_($file) =~ /^\s*default-lease-time\s+(.*);/m, split(' ', $1)) ],
- max_lease_time => [ if_(cat_($file) =~ /^\s*max-lease-time\s+(.*);/m, split(' ', $1)) ] };
+ my ($o_file) = @_;
+ my $s = cat_($o_file || "$::prefix/etc/dhcpd.conf");
+ { option_routers => [ $s =~ /^\s*option routers\s+(\S+);/mg ],
+ subnet_mask => [ if_($s =~ /^\s*option subnet-mask\s+(.*);/mg, split(' ', $1)) ],
+ domain_name => [ if_($s =~ /^\s*option domain-name\s+"(.*)";/mg, split(' ', $1)) ],
+ domain_name_servers => [ if_($s =~ /^\s*option domain-name-servers\s+(.*);/m, split(' ', $1)) ],
+ dynamic_bootp => [ if_($s =~ /^\s*range dynamic-bootp\s+\S+\.(\d+)\s+\S+\.(\d+)\s*;/m, split(' ', $1)) ],
+ default_lease_time => [ if_($s =~ /^\s*default-lease-time\s+(.*);/m, split(' ', $1)) ],
+ max_lease_time => [ if_($s =~ /^\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)) ] };
+ my ($o_file) = @_;
+ my $s = cat_($o_file || "$::prefix/etc/squid/squid.conf");
+ { http_port => [ $s =~ /^\s*http_port\s+(.*)/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)) ] };
}
sub read_tmdns_conf() {