diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-12-21 14:36:05 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-12-21 14:36:05 +0000 |
commit | c0594dc68e91165a1c5357296a6a5bcda2bfe2b1 (patch) | |
tree | 8e06034828b73a2fa8e247e3ab457efab143ac54 | |
parent | 859695925c701d7408c0f97825512e2260998fd2 (diff) | |
download | drakx-c0594dc68e91165a1c5357296a6a5bcda2bfe2b1.tar drakx-c0594dc68e91165a1c5357296a6a5bcda2bfe2b1.tar.gz drakx-c0594dc68e91165a1c5357296a6a5bcda2bfe2b1.tar.bz2 drakx-c0594dc68e91165a1c5357296a6a5bcda2bfe2b1.tar.xz drakx-c0594dc68e91165a1c5357296a6a5bcda2bfe2b1.zip |
- fs::mount() wants a real device or a faked one, but doesn't accept things like fd0 anymore (give it /dev/fd0)
- a little more robust analyze_wild_device_name() during install
- handle bad things in subpart_from_wild_device_name()
-rw-r--r-- | perl-install/any.pm | 2 | ||||
-rw-r--r-- | perl-install/fs.pm | 11 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 2 |
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; |