summaryrefslogtreecommitdiffstats
path: root/perl-install/install/install2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-05-23 18:26:55 +0000
committerThierry Vignaud <tv@mageia.org>2012-05-23 18:26:55 +0000
commitfee0ff950c06d7a7e6a92b5ec75f8a0a8503ab74 (patch)
treea82981694a11a5a3857155d31684a5cc6e6be609 /perl-install/install/install2.pm
parentcc57740d5578e5b5b5755c33494ed2c2f0b21222 (diff)
downloaddrakx-fee0ff950c06d7a7e6a92b5ec75f8a0a8503ab74.tar
drakx-fee0ff950c06d7a7e6a92b5ec75f8a0a8503ab74.tar.gz
drakx-fee0ff950c06d7a7e6a92b5ec75f8a0a8503ab74.tar.bz2
drakx-fee0ff950c06d7a7e6a92b5ec75f8a0a8503ab74.tar.xz
drakx-fee0ff950c06d7a7e6a92b5ec75f8a0a8503ab74.zip
(parse_args) split it out of main()
Diffstat (limited to 'perl-install/install/install2.pm')
-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};