summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-13 14:29:11 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-13 14:29:11 +0000
commitcf5dce530e20a282bfd11ae5aacfc28045c86cac (patch)
tree2f0ddc1e9badfc0c0aedc201693c3b993db886cb
parent794d95e5ee8251db0282ced9a390279549612b80 (diff)
downloaddrakx-cf5dce530e20a282bfd11ae5aacfc28045c86cac.tar
drakx-cf5dce530e20a282bfd11ae5aacfc28045c86cac.tar.gz
drakx-cf5dce530e20a282bfd11ae5aacfc28045c86cac.tar.bz2
drakx-cf5dce530e20a282bfd11ae5aacfc28045c86cac.tar.xz
drakx-cf5dce530e20a282bfd11ae5aacfc28045c86cac.zip
Remount CD1 if we cancel insertion of a supplementary CD
-rw-r--r--perl-install/install_any.pm20
1 files changed, 13 insertions, 7 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index e7e951dd5..f4aee9518 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -436,6 +436,15 @@ sub prep_net_suppl_media {
sleep(3);
}
+sub remountCD1 {
+ my ($o, $cdrom) = @_;
+ openCdromTray($cdrom);
+ $o->ask_warn('', N("Insert the CD 1 again"));
+ mountCdrom("/tmp/image", $cdrom);
+ log::l($@) if $@;
+ $asked_medium = 1;
+}
+
sub selectSupplMedia {
my ($o, $suppl_method) = @_;
#- ask whether there are supplementary media
@@ -491,13 +500,10 @@ sub selectSupplMedia {
log::l("Umounting suppl. CD, back to medium 1");
eval { fs::umount("/mnt/cdrom") };
#- re-mount CD 1 if this was a cdrom install
- if ($main_method eq 'cdrom') {
- openCdromTray($cdrom);
- $o->ask_warn('', N("Insert the CD 1 again"));
- mountCdrom("/tmp/image", $cdrom);
- log::l($@) if $@;
- $asked_medium = 1;
- }
+ $main_method eq 'cdrom' and remountCD1($o, $cdrom);
+ } else {
+ $main_method eq 'cdrom' and remountCD1($o, $cdrom);
+ return 'error';
}
} else {
my $url;