From 5bd8788a9a667a2a6c474e562f98ccfb9b694f0b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 May 2012 18:27:47 +0000 Subject: (init_modules_conf) split it out of main() --- perl-install/install/install2.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index 556630fa0..4fa6f4811 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -541,6 +541,14 @@ sub init_mouse() { mouse::load_modules($o->{mouse}); } +sub init_modules_conf() { + list_modules::load_default_moddeps(); + require modules::any_conf; + require modules::modules_conf; + $o->{modules_conf} = modules::modules_conf::read(modules::any_conf::vnew(), '/tmp/modules.conf'); + modules::read_already_loaded($o->{modules_conf}); +} + sub process_auto_steps() { foreach (@::auto_steps) { if (my $s = $o->{steps}{/::(.*)/ ? $1 : $_}) { @@ -601,11 +609,7 @@ sub main { eval { install::any::spawnShell() }; - list_modules::load_default_moddeps(); - require modules::any_conf; - require modules::modules_conf; - $o->{modules_conf} = modules::modules_conf::read(modules::any_conf::vnew(), '/tmp/modules.conf'); - modules::read_already_loaded($o->{modules_conf}); + init_modules_conf(); #- done before auto_install is called to allow the -IP feature on auto_install file name read_stage1_net_conf() if -e '/tmp/network'; -- cgit v1.2.1