summaryrefslogtreecommitdiffstats
path: root/perl-install/install/install2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-05-23 18:26:47 +0000
committerThierry Vignaud <tv@mageia.org>2012-05-23 18:26:47 +0000
commita8668ae5c3163834cfc53661bb4a4ba4871c72ac (patch)
tree0f1e2f513bd040d03d8fc19d9114c8bf994f53bd /perl-install/install/install2.pm
parent40139b515003b0c47c74f5bb88cf2700631bddff (diff)
downloaddrakx-backup-do-not-use-a8668ae5c3163834cfc53661bb4a4ba4871c72ac.tar
drakx-backup-do-not-use-a8668ae5c3163834cfc53661bb4a4ba4871c72ac.tar.gz
drakx-backup-do-not-use-a8668ae5c3163834cfc53661bb4a4ba4871c72ac.tar.bz2
drakx-backup-do-not-use-a8668ae5c3163834cfc53661bb4a4ba4871c72ac.tar.xz
drakx-backup-do-not-use-a8668ae5c3163834cfc53661bb4a4ba4871c72ac.zip
(step_init) split it out of main()
Diffstat (limited to 'perl-install/install/install2.pm')
-rw-r--r--perl-install/install/install2.pm41
1 files changed, 23 insertions, 18 deletions
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index b58cba988..d8594b8db 100644
--- a/perl-install/install/install2.pm
+++ b/perl-install/install/install2.pm
@@ -341,6 +341,28 @@ sub init_brltty() {
run_program::run("brltty");
}
+sub step_init {
+ my ($o) = @_;
+ my $o_;
+ while (1) {
+ $o_ = $::auto_install ?
+ install::steps_auto_install->new($o) :
+ $o->{interactive} eq "stdio" ?
+ install::steps_stdio->new($o) :
+ $o->{interactive} eq "curses" ?
+ install::steps_curses->new($o) :
+ $o->{interactive} eq "gtk" ?
+ install::steps_gtk->new($o) :
+ die "unknown install type";
+ $o_ and last;
+
+ log::l("$o->{interactive} failed, trying again with curses");
+ $o->{interactive} = "curses";
+ require install::steps_curses;
+ }
+ $o;
+}
+
sub read_product_id() {
my $product_id = cat__(install::any::getFile_($o->{stage2_phys_medium}, "product.id"));
log::l('product_id: ' . chomp_($product_id));
@@ -610,26 +632,9 @@ sub main {
}
}
- my $o_;
$ENV{COLUMNS} ||= 80;
$ENV{LINES} ||= 25;
- while (1) {
- $o_ = $::auto_install ?
- install::steps_auto_install->new($o) :
- $o->{interactive} eq "stdio" ?
- install::steps_stdio->new($o) :
- $o->{interactive} eq "curses" ?
- install::steps_curses->new($o) :
- $o->{interactive} eq "gtk" ?
- install::steps_gtk->new($o) :
- die "unknown install type";
- $o_ and last;
-
- log::l("$o->{interactive} failed, trying again with curses");
- $o->{interactive} = "curses";
- require install::steps_curses;
- }
- $::o = $o = $o_;
+ $::o = $o = step_init($o);
eval { output('/proc/splash', "verbose\n") };