From 841e3d34a601bb0bef26a57668533bc38ac92a04 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 21 Mar 2001 18:40:26 +0000 Subject: (g_default_packages): nice warning if mount in vfat fails --- perl-install/install_any.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 3868f3bba..b07038609 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -581,9 +581,13 @@ sub g_default_packages { my $floppy = detect_devices::floppy(); - $o->ask_okcancel('', _("Insert a FAT formatted floppy in drive %s", $floppy), 1) or return; + while (1) { + $o->ask_okcancel('', _("Insert a FAT formatted floppy in drive %s", $floppy), 1) or return; - fs::mount(devices::make($floppy), "/floppy", "vfat", 0); + eval { fs::mount(devices::make($floppy), "/floppy", "vfat", 0) }; + last if !$@; + $o->ask_warn('', _("This floppy is not FAT formatted")); + } require Data::Dumper; output('/floppy/auto_inst.cfg', -- cgit v1.2.1