summaryrefslogtreecommitdiffstats
path: root/perl-install
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
commit0e8c8254db9eb7334b190afe23d64ea3c3844f11 (patch)
tree0f1e2f513bd040d03d8fc19d9114c8bf994f53bd /perl-install
parent95625f03125103808e0ba3591a632350b7d23a87 (diff)
downloaddrakx-0e8c8254db9eb7334b190afe23d64ea3c3844f11.tar
drakx-0e8c8254db9eb7334b190afe23d64ea3c3844f11.tar.gz
drakx-0e8c8254db9eb7334b190afe23d64ea3c3844f11.tar.bz2
drakx-0e8c8254db9eb7334b190afe23d64ea3c3844f11.tar.xz
drakx-0e8c8254db9eb7334b190afe23d64ea3c3844f11.zip
(step_init) split it out of main()
Diffstat (limited to 'perl-install')
-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") };