diff options
Diffstat (limited to 'perl-install/network')
-rw-r--r-- | perl-install/network/netconnect.pm | 2 | ||||
-rw-r--r-- | perl-install/network/tools.pm | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 6771b8210..57dd82c88 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -754,7 +754,7 @@ or skip and do it later."), } return "adsl_no_firmawre" if $adsl_answer eq N("Do it later"); - my $_b = before_leaving { fs::umount('/mnt') } if $mounted; + my $_b = $mounted && before_leaving { fs::umount('/mnt') }; if (!$adsl_failed) { if (-e "$source/$file") { cp_af("$source/$file", $destination) if !$::testing; diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 759e6fc66..d573e41d8 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -199,10 +199,14 @@ sub use_floppy { my $floppy = detect_devices::floppy(); $in->ask_okcancel(N("Insert floppy"), N("Insert a FAT formatted floppy in drive %s with %s in root directory and press %s", $floppy, $file, N("Next"))) or return; - eval { fs::mount(devices::make($floppy), '/mnt', 'vfat', 'readonly'); 1 } or my $failed = N("Floppy access error, unable to mount device %s", $floppy); - log::explanations($failed || "Mounting floppy device $floppy in /mnt"); - - return '/mnt', $failed; + if (eval { fs::mount(devices::make($floppy), '/mnt', 'vfat', 'readonly'); 1 }) { + log::explanations("Mounting floppy device $floppy in /mnt"); + '/mnt'; + } else { + my $failed = N("Floppy access error, unable to mount device %s", $floppy); + log::explanations($failed); + undef, $failed; + } } |