summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-19 11:09:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-19 11:09:13 +0000
commit83b51c245c7ababbd67e8f7631635c6961ee00ec (patch)
tree41d53100f77911c016b9d83b46ddf7e39a0fe313
parenta7c4da70144529a77ebba02e5f8c9562dce60eb8 (diff)
downloaddrakx-backup-do-not-use-83b51c245c7ababbd67e8f7631635c6961ee00ec.tar
drakx-backup-do-not-use-83b51c245c7ababbd67e8f7631635c6961ee00ec.tar.gz
drakx-backup-do-not-use-83b51c245c7ababbd67e8f7631635c6961ee00ec.tar.bz2
drakx-backup-do-not-use-83b51c245c7ababbd67e8f7631635c6961ee00ec.tar.xz
drakx-backup-do-not-use-83b51c245c7ababbd67e8f7631635c6961ee00ec.zip
move loading /tmp/network from stage1 before doing the auto_install stuff to
allow the -IP feature on auto_install file name
-rw-r--r--perl-install/install2.pm40
1 files changed, 23 insertions, 17 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index e810dedee..be55018c1 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -455,8 +455,31 @@ sub main {
modules::read_stage1_conf($_) foreach "/tmp/conf.modules", "/etc/modules.conf";
modules::read_already_loaded();
+ #- done before auto_install is called to allow the -IP feature on auto_install file name
+ if (-e '/tmp/network') {
+ require network;
+ #- get stage1 network configuration if any.
+ log::l('found /tmp/network');
+ $o->{netc} ||= {};
+ add2hash($o->{netc}, network::read_conf('/tmp/network'));
+ if (my ($file) = glob_('/tmp/ifcfg-*')) {
+ log::l("found network config file $file");
+ my $l = network::read_interface_conf($file);
+ $o->{intf} ||= { $l->{DEVICE} => $l };
+ }
+ if (-e '/etc/resolv.conf') {
+ my $file ='/etc/resolv.conf';
+ log::l("found network config file $file");
+ add2hash($o->{netc}, network::read_resolv_conf($file));
+ }
+ }
+
#- done after module dependencies are loaded for "vfat depends on fat"
if ($::auto_install) {
+ if ($::auto_install =~ /-IP(\.pl)?/) {
+ my $ip = join('', map { sprintf "%02X", $_ } split '\.', $o->{intf}{IPADDR});
+ $::auto_install =~ s/-IP(\.pl)?/-$ip$1/;
+ }
require install_steps_auto_install;
eval { $o = $::o = install_any::loadO($o, $::auto_install) };
if ($@) {
@@ -534,23 +557,6 @@ sub main {
}
$::o = $o = $o_;
- if (-e '/tmp/network') {
- require network;
- #- get stage1 network configuration if any.
- log::l('found /tmp/network');
- $o->{netc} ||= {};
- add2hash($o->{netc}, network::read_conf('/tmp/network'));
- if (my ($file) = glob_('/tmp/ifcfg-*')) {
- log::l("found network config file $file");
- my $l = network::read_interface_conf($file);
- $o->{intf} ||= { $l->{DEVICE} => $l };
- }
- if (-e '/etc/resolv.conf') {
- my $file ='/etc/resolv.conf';
- log::l("found network config file $file");
- add2hash($o->{netc}, network::read_resolv_conf($file));
- }
- }
install_any::remove_unused() if common::usingRamdisk();
#-the main cycle