summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-28 14:11:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-28 14:11:31 +0000
commit5959d4ba33bd28b4846f77742ed8d03949c9512f (patch)
treeed0e5951390930005350e041d4b0e10572545a51 /perl-install
parentcbfa51b786e065b87c0b9e8504d6d609e0641716 (diff)
downloaddrakx-5959d4ba33bd28b4846f77742ed8d03949c9512f.tar
drakx-5959d4ba33bd28b4846f77742ed8d03949c9512f.tar.gz
drakx-5959d4ba33bd28b4846f77742ed8d03949c9512f.tar.bz2
drakx-5959d4ba33bd28b4846f77742ed8d03949c9512f.tar.xz
drakx-5959d4ba33bd28b4846f77742ed8d03949c9512f.zip
create reboot() out of acceptLicense()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm21
1 files changed, 13 insertions, 8 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 366309ef2..37fc78067 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -925,16 +925,21 @@ sub acceptLicense {
callbacks => { ok_disabled => sub { $r eq 'Refuse' } },
},
[ { list => [ N_("Accept"), N_("Refuse") ], val => \$r, type => 'list', format => sub { translate($_[0]) } } ])
- or do {
- # when refusing license in finish-install:
- exec("/sbin/reboot") if !$::isInstall;
-
- install::media::umount_phys_medium($o->{stage2_phys_medium});
- install::media::openCdromTray($o->{stage2_phys_medium}{device}) if !detect_devices::is_xbox() && $o->{method} eq 'cdrom';
- $o->exit;
- };
+ or reboot($o);
}
+sub reboot {
+ my ($o) = @_;
+
+ if ($::isInstall) {
+ install::media::umount_phys_medium($o->{stage2_phys_medium});
+ install::media::openCdromTray($o->{stage2_phys_medium}{device}) if !detect_devices::is_xbox() && $o->{method} eq 'cdrom';
+ $o->exit;
+ } else {
+ # when refusing license in finish-install:
+ exec("/sbin/reboot");
+ }
+}
sub selectLanguage_install {
my ($in, $locale) = @_;