From e87ebc0a0e5e83964d7e266d50c73321484eed2e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 8 Dec 1999 00:49:14 +0000 Subject: no_comment --- perl-install/network.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'perl-install/network.pm') diff --git a/perl-install/network.pm b/perl-install/network.pm index e471734bc..3f028f320 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -10,6 +10,7 @@ use Socket; use common qw(:common :file :system :functional); use detect_devices; +use run_program; use log; #-###################################################################################### @@ -47,6 +48,14 @@ sub read_interface_conf { \%intf; } +sub up_it { + my ($prefix, $intfs) = @_; + $_->{isUp} and return foreach @$intfs; + my $f = "/etc/resolv.conf"; symlink "$prefix/$f", $f; + run_program::rooted($prefix, "/etc/rc.d/init.d/network", "start"); + $_->{isUp} = 1 foreach @$intfs; +} + sub write_conf { my ($file, $netc) = @_; @@ -148,7 +157,10 @@ sub sethostname { sub resolv($) { my ($name) = @_; - is_ip($name) ? $name : join(".", unpack "C4", (gethostbyname $name)[4]); + is_ip($name) and return $name; + my $a = join(".", unpack "C4", (gethostbyname $name)[4]); + log::l("resolved $name in $a"); + $a; } sub dnsServers { -- cgit v1.2.1