summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-28 11:51:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-28 11:51:08 +0000
commit3e709fbeb3ff3366987211c6b2c78cb9d969805b (patch)
tree4121653c22c988da5b6b5c96a9b0dd9df515bd93 /perl-install
parent76bcdf71f21c16eb2b27b7e92ad778cd4b0eca25 (diff)
downloaddrakx-3e709fbeb3ff3366987211c6b2c78cb9d969805b.tar
drakx-3e709fbeb3ff3366987211c6b2c78cb9d969805b.tar.gz
drakx-3e709fbeb3ff3366987211c6b2c78cb9d969805b.tar.bz2
drakx-3e709fbeb3ff3366987211c6b2c78cb9d969805b.tar.xz
drakx-3e709fbeb3ff3366987211c6b2c78cb9d969805b.zip
use new function part2device() to have the file from {device} (fixes mounting of ntfs in standalone)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm22
1 files changed, 14 insertions, 8 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index ada108b17..4d94586cd 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -203,15 +203,9 @@ sub prepare_write_fstab {
my @smb_credentials;
my @l = map {
my $device =
- $_->{device} eq 'none' || member($_->{type}, qw(nfs smbfs davfs)) ?
- $_->{device} :
isLoopback($_) ?
($_->{mntpoint} eq '/' ? "/initrd/loopfs" : "$_->{loopback_device}{mntpoint}") . $_->{loopback_file} :
- do {
- my $dir = $_->{device} =~ m!^(/|LABEL=)! ? '' : '/dev/';
- eval { devices::make("$prefix$dir$_->{device}") };
- "$dir$_->{device}";
- };
+ part2device($prefix, $_->{device}, $_->{type});
my $real_mntpoint = $_->{mntpoint} || ${{ '/tmp/hdimage' => '/mnt/hd' }}{$_->{real_mntpoint}};
mkdir_p("$prefix$real_mntpoint", 0755) if $real_mntpoint =~ m|^/|;
@@ -280,6 +274,17 @@ sub write_fstab {
network::smb::save_credentials($_) foreach @$smb_credentials;
}
+sub part2device {
+ my ($prefix, $dev, $type) = @_;
+ $dev eq 'none' || member($type, qw(nfs smbfs davfs)) ?
+ $dev :
+ do {
+ my $dir = $dev =~ m!^(/|LABEL=)! ? '' : '/dev/';
+ eval { devices::make("$prefix$dir$dev") };
+ "$dir$dev";
+ };
+}
+
sub auto_fs() {
grep { chop; $_ && !/nodev/ } cat_("/etc/filesystems");
}
@@ -684,13 +689,14 @@ sub mount {
-d $where or mkdir_p($where);
+ $dev = part2device('', $dev, $fs);
+
my @fs_modules = qw(vfat hfs romfs ufs reiserfs xfs jfs ext3);
if (member($fs, 'smb', 'smbfs', 'nfs', 'davfs', 'ntfs') && $::isStandalone) {
system('mount', '-t', $fs, $dev, $where, '-o', $options) == 0 or die _("mounting partition %s in directory %s failed", $dev, $where);
return; #- do not update mtab, already done by mount(8)
} elsif (member($fs, 'ext2', 'proc', 'usbdevfs', 'iso9660', @fs_modules)) {
- $dev = devices::make($dev) if $fs ne 'proc' && $fs ne 'usbdevfs';
$where =~ s|/$||;
my $flag = c::MS_MGC_VAL();