summaryrefslogtreecommitdiffstats
path: root/perl-install/network.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-08 00:49:14 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-08 00:49:14 +0000
commite87ebc0a0e5e83964d7e266d50c73321484eed2e (patch)
treeebf0db8cfa6eb885238d9f487483d0ff7898c67d /perl-install/network.pm
parenta3d1d777b3ec42680658523e265c0538c121b594 (diff)
downloaddrakx-backup-do-not-use-e87ebc0a0e5e83964d7e266d50c73321484eed2e.tar
drakx-backup-do-not-use-e87ebc0a0e5e83964d7e266d50c73321484eed2e.tar.gz
drakx-backup-do-not-use-e87ebc0a0e5e83964d7e266d50c73321484eed2e.tar.bz2
drakx-backup-do-not-use-e87ebc0a0e5e83964d7e266d50c73321484eed2e.tar.xz
drakx-backup-do-not-use-e87ebc0a0e5e83964d7e266d50c73321484eed2e.zip
no_comment
Diffstat (limited to 'perl-install/network.pm')
-rw-r--r--perl-install/network.pm14
1 files changed, 13 insertions, 1 deletions
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 {