summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-07-22 05:11:58 +0000
committerOlivier Blin <oblin@mandriva.org>2004-07-22 05:11:58 +0000
commit6bcbaf9871847262d3c1899a334e968e817ce5d0 (patch)
treed22982d0fdca54758e1f1f0c03f391401e362bed
parentb389da8386be2cc0a6ab70e7cf07bafac8510b1a (diff)
downloaddrakx-backup-do-not-use-6bcbaf9871847262d3c1899a334e968e817ce5d0.tar
drakx-backup-do-not-use-6bcbaf9871847262d3c1899a334e968e817ce5d0.tar.gz
drakx-backup-do-not-use-6bcbaf9871847262d3c1899a334e968e817ce5d0.tar.bz2
drakx-backup-do-not-use-6bcbaf9871847262d3c1899a334e968e817ce5d0.tar.xz
drakx-backup-do-not-use-6bcbaf9871847262d3c1899a334e968e817ce5d0.zip
rewrite read_tmdns_conf to use cat_
-rw-r--r--perl-install/network/network.pm11
1 files changed, 1 insertions, 10 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index d0094fc4c..b81604d12 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -73,16 +73,7 @@ sub read_squid_conf {
}
sub read_tmdns_conf {
- my ($file) = @_;
- local *F; open $F, $file or die "cannot open file $file: $!";
- local $_;
- my %outf;
-
- while (<F>) {
- ($outf{ZEROCONF_HOSTNAME}) = /^\s*hostname\s*=\s*(\w+)/ and return \%outf;
- }
-
- \%outf;
+ { if_(cat_($_[0]) =~ /^\s*hostname\s*=\s*(\w+)/m, ZEROCONF_HOSTNAME => $1) };
}
sub write_conf {