diff options
author | Francois Pons <fpons@mandriva.com> | 2000-09-12 09:13:15 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-09-12 09:13:15 +0000 |
commit | 55597dec8c0060b2dab62c51783b18319bb1eb10 (patch) | |
tree | 56e2ec87730623ad4e603aab02fbe4390b3f24e4 /perl-install/install2.pm | |
parent | 3a6829ded0f6b8d7ebdff8aec615b134e19b8943 (diff) | |
download | drakx-backup-do-not-use-55597dec8c0060b2dab62c51783b18319bb1eb10.tar drakx-backup-do-not-use-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.gz drakx-backup-do-not-use-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.bz2 drakx-backup-do-not-use-55597dec8c0060b2dab62c51783b18319bb1eb10.tar.xz drakx-backup-do-not-use-55597dec8c0060b2dab62c51783b18319bb1eb10.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/install2.pm')
-rw-r--r-- | perl-install/install2.pm | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 8dcfb8aa0..b3545e3b1 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -180,7 +180,7 @@ $o = $::o = { orderedSteps => \@orderedInstallSteps, #- for the list of fields available for user and superuser, see @etc_pass_fields in install_steps.pm -#- intf => [ { DEVICE => "eth0", IPADDR => '1.2.3.4', NETMASK => '255.255.255.128' } ], +#- intf => { eth0 => { DEVICE => "eth0", IPADDR => '1.2.3.4', NETMASK => '255.255.255.128' } }, #-step : the current one #-prefix @@ -373,18 +373,7 @@ STORAGE= sub configureNetwork { $::live and return; #- get current configuration of network device. - eval { - $o->{netc} ||= {}; $o->{intf} ||= []; - add2hash($o->{netc}, network::read_conf("$o->{prefix}/etc/sysconfig/network")) if -r "$o->{prefix}/etc/sysconfig/network"; - add2hash($o->{netc}, network::read_resolv_conf("$o->{prefix}/etc/resolv.conf")) if -r "$o->{prefix}/etc/resolv.conf"; - foreach (all("$o->{prefix}/etc/sysconfig/network-scripts")) { - if (/ifcfg-(\w+)/ && $1 ne 'lo' && $1 !~ /ppp/) { - my $intf = network::findIntf($o->{intf}, $1); - add2hash($intf, { getVarsFromSh("$o->{prefix}/etc/sysconfig/network-scripts/$_") }); - } - } - }; - + eval { network::read_all_conf($o->{prefix}, $o->{netc} ||= {}, $o->{intf} ||= {}) }; $o->configureNetwork($_[1] == 1); } #------------------------------------------------------------------------------ @@ -658,7 +647,7 @@ sub main { if (my ($file) = glob_('/tmp/ifcfg-*')) { log::l("found network config file $file"); my $l = network::read_interface_conf($file); - add2hash(network::findIntf($o->{intf} ||= [], $l->{DEVICE}), $l); + add2hash(network::findIntf($o->{intf} ||= {}, $l->{DEVICE}), $l); } #-the main cycle |