From c9f15c2919d16a8dad47f4fa036b84392cc76bb3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 22 Jul 2004 05:42:21 +0000 Subject: - don't use if_() when not needed and strange - read_tmdns_conf() now knows which file it reads, don't give it as argument --- perl-install/network/network.pm | 8 ++++---- 1 file 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); -- cgit v1.2.1