summaryrefslogtreecommitdiffstats
path: root/perl-install
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
commitf37fb36f71adf2394e836e741a14ea523975e167 (patch)
treea82981694a11a5a3857155d31684a5cc6e6be609 /perl-install
parent84e5cbef6b3d2f6d6114630063ad644f42adc76e (diff)
downloaddrakx-backup-do-not-use-f37fb36f71adf2394e836e741a14ea523975e167.tar
drakx-backup-do-not-use-f37fb36f71adf2394e836e741a14ea523975e167.tar.gz
drakx-backup-do-not-use-f37fb36f71adf2394e836e741a14ea523975e167.tar.bz2
drakx-backup-do-not-use-f37fb36f71adf2394e836e741a14ea523975e167.tar.xz
drakx-backup-do-not-use-f37fb36f71adf2394e836e741a14ea523975e167.zip
(parse_args) split it out of main()
Diffstat (limited to 'perl-install')
-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};