From 0871f6f667cf301c9973d14ab612456177789389 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 May 2012 18:27:13 +0000 Subject: (process_patch) split it out of main() --- perl-install/install/install2.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index c3fb2fe03..566a3ddc7 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -545,6 +545,15 @@ sub process_auto_steps() { } } +sub process_patch { + my ($cfg, $patch) = @_; + #- oem patch should be read before to still allow patch or defcfg. + eval { $o = $::o = install::any::loadO($o, "install/patch-oem.pl"); log::l("successfully read oem patch") }; + #- patch should be read after defcfg in order to take precedance. + eval { $o = $::o = install::any::loadO($o, $cfg); log::l("successfully read default configuration: $cfg") } if $cfg; + eval { $o = $::o = install::any::loadO($o, "patch"); log::l("successfully read patch") } if $patch; +} + #-###################################################################################### #- MAIN #-###################################################################################### @@ -619,11 +628,7 @@ sub main { #- needed before accessing floppy (in case of usb floppy) modules::load_category($o->{modules_conf}, 'bus/usb'); - #- oem patch should be read before to still allow patch or defcfg. - eval { $o = $::o = install::any::loadO($o, "install/patch-oem.pl"); log::l("successfully read oem patch") }; - #- patch should be read after defcfg in order to take precedance. - eval { $o = $::o = install::any::loadO($o, $cfg); log::l("successfully read default configuration: $cfg") } if $cfg; - eval { $o = $::o = install::any::loadO($o, "patch"); log::l("successfully read patch") } if $patch; + process_patch($cfg, $patch); eval { modules::load("af_packet") }; -- cgit v1.2.1