summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-10-15 12:34:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-10-15 12:34:05 +0000
commit6d5cba8e5b4f47874e8aab377b7b4181aff6faa2 (patch)
treee901c38ba2bcd402272a561e8818639383f73167
parent2129b98f49dee51358c410363215e5457d4004d8 (diff)
downloaddrakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.tar
drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.tar.gz
drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.tar.bz2
drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.tar.xz
drakx-6d5cba8e5b4f47874e8aab377b7b4181aff6faa2.zip
cleanup thanks to perl_checker
-rw-r--r--perl-install/network/netconnect.pm2
-rw-r--r--perl-install/network/tools.pm12
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;
+ }
}