summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/fs.pm11
-rw-r--r--perl-install/install_steps.pm2
3 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 9eed58f0d..1a82fd2c0 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -574,7 +574,7 @@ sub inspect {
$dir = '';
} else {
mkdir $dir, 0700;
- eval { fs::mount($part->{device}, $dir, $part->{fs_type}, !$b_rw) };
+ eval { fs::mount(devices::make($part->{device}), $dir, $part->{fs_type}, !$b_rw) };
$@ and return;
}
my $h = before_leaving {
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 542df8a3f..a797977d6 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -131,7 +131,7 @@ sub analyze_wild_device_name {
if ($dev =~ m!^/u?dev/(.*)!) {
'dev', $dev;
- } elsif ($dev !~ m!^/! && -e "$::prefix/dev/$dev") {
+ } elsif ($dev !~ m!^/! && (-e "/dev/$dev" || -e "$::prefix/dev/$dev")) {
'dev', "/dev/$dev";
} elsif ($dev =~ /^LABEL=(.*)/) {
'label', $1;
@@ -207,6 +207,9 @@ sub part2wild_device_name {
};
if ($faked_device) {
$part->{device};
+ } elsif ($part->{device} =~ m!^/dev/!) {
+ log::l("ERROR: i have a full device $part->{device}, this should not happen. use subpart_from_wild_device_name() instead of creating bad part data-structures!");
+ $part->{device};
} else {
my $dev = "/dev/$part->{device}";
eval { devices::make("$prefix$dev") };
@@ -478,8 +481,6 @@ sub mount {
-d $where or mkdir_p($where);
- $dev = part2wild_device_name('', { device => $dev });
-
$fs or log::l("not mounting $dev partition"), return;
my @fs_modules = qw(vfat hfs romfs ufs reiserfs xfs jfs ext3);
@@ -597,7 +598,7 @@ sub mount_part {
} elsif (loopback::carryRootLoopback($part)) {
$mntpoint = "/initrd/loopfs";
}
- my $dev = $part->{real_device} || $part->{device};
+ my $dev = devices::make($part->{real_device} || $part->{device});
mount($dev, $mntpoint, $part->{fs_type}, $b_rdonly, $part->{options}, $o_wait_message);
rmdir "$mntpoint/lost+found";
}
@@ -649,7 +650,7 @@ sub df {
return; #- will not even try!
} else {
mkdir_p($dir);
- eval { mount($part->{device}, $dir, $part->{fs_type}, 'readonly') };
+ eval { mount(devices::make($part->{device}), $dir, $part->{fs_type}, 'readonly') };
if ($@) {
set_isFormatted($part, 0);
unlink $dir;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 12516e4da..e139b4b64 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -622,7 +622,7 @@ sub updateModulesFromFloppy {
my ($o) = @_;
return if $::testing;
- fs::mount($o->{updatemodules}, "/floppy", "ext2", 0);
+ fs::mount(devices::make($o->{updatemodules}), "/floppy", "ext2", 0);
foreach my $kernel_version (all("$::prefix/lib/modules")) {
log::l("examining updated modules for kernel $kernel_version");
-d "/floppy/$kernel_version" or next;