From 5959d4ba33bd28b4846f77742ed8d03949c9512f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 28 Mar 2008 14:11:31 +0000 Subject: create reboot() out of acceptLicense() --- perl-install/any.pm | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'perl-install/any.pm') 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) = @_; -- cgit v1.2.1