summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install/install2.pm34
1 files changed, 20 insertions, 14 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index b2a8ec42d..59e828074 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -413,20 +413,7 @@ sub read_stage1_net_conf() {
}
}
-#-######################################################################################
-#- MAIN
-#-######################################################################################
-sub main {
- $SIG{SEGV} = \&sig_segv_handler;
- $ENV{PERL_BADLANG} = 1;
- delete $ENV{TERMINFO};
- umask 022;
-
- $::isWizard = 1;
- $::no_ugtk_init = 1;
-
- push @::textdomains, 'DrakX', 'drakx-net', 'drakx-kbd-mouse-x11';
-
+sub parse_args {
my ($cfg, $patch);
my %cmdline = map {
my ($n, $v) = split /=/;
@@ -495,6 +482,25 @@ sub main {
}}{lc $n}; &$f if $f;
} %cmdline;
+ ($cfg, $patch);
+}
+
+#-######################################################################################
+#- MAIN
+#-######################################################################################
+sub main {
+ $SIG{SEGV} = \&sig_segv_handler;
+ $ENV{PERL_BADLANG} = 1;
+ delete $ENV{TERMINFO};
+ umask 022;
+
+ $::isWizard = 1;
+ $::no_ugtk_init = 1;
+
+ push @::textdomains, 'DrakX', 'drakx-net', 'drakx-kbd-mouse-x11';
+
+ my ($cfg, $patch) = parse_args(@_);
+
if ($::testing) {
$ENV{SHARE_PATH} ||= "/export/install/stage2/live/usr/share";
$ENV{SHARE_PATH} = "/usr/share" if !-e $ENV{SHARE_PATH};