summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-22 05:42:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-22 05:42:21 +0000
commitc9f15c2919d16a8dad47f4fa036b84392cc76bb3 (patch)
tree7c888a03aa1531de5dcd2f75b7cd62e2503f68fc /perl-install/network/network.pm
parent30cc5e56fddd41ffb192f9cff9205b111d83849c (diff)
downloaddrakx-c9f15c2919d16a8dad47f4fa036b84392cc76bb3.tar
drakx-c9f15c2919d16a8dad47f4fa036b84392cc76bb3.tar.gz
drakx-c9f15c2919d16a8dad47f4fa036b84392cc76bb3.tar.bz2
drakx-c9f15c2919d16a8dad47f4fa036b84392cc76bb3.tar.xz
drakx-c9f15c2919d16a8dad47f4fa036b84392cc76bb3.zip
- don't use if_() when not needed and strange
- read_tmdns_conf() now knows which file it reads, don't give it as argument
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index b97aaeb3f..2d66495ae 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -72,9 +72,9 @@ sub read_squid_conf {
admin_mail => [ if_(cat_($file) =~ /^\s*err_html_text\s+(.*)/mg, split(' ', $1)) ] };
}
-sub read_tmdns_conf {
- my ($file) = @_;
- if_(cat_($file) =~ /^\s*hostname\s*=\s*(\w+)/m, { ZEROCONF_HOSTNAME => $1 });
+sub read_tmdns_conf() {
+ my ($file) = "$::prefix/etc/tmdns.conf";
+ cat_($file) =~ /^\s*hostname\s*=\s*(\w+)/m && { ZEROCONF_HOSTNAME => $1 };
}
sub write_conf {
@@ -334,7 +334,7 @@ sub read_all_conf {
my $netcnx = $o_netcnx || {};
add2hash($netc, read_conf("$::prefix/etc/sysconfig/network")) if -r "$::prefix/etc/sysconfig/network";
add2hash($netc, read_resolv_conf());
- add2hash($netc, read_tmdns_conf("$::prefix/etc/tmdns.conf")) if -r "$::prefix/etc/tmdns.conf";
+ add2hash($netc, read_tmdns_conf());
foreach (all("$::prefix/etc/sysconfig/network-scripts")) {
if (/^ifcfg-([A-Za-z0-9.:]+)$/ && $1 ne 'lo') {
my $intf = findIntf($intf, $1);