summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-12-05 16:32:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-12-05 16:32:11 +0000
commitf06fc2cef872084dcca9d28230763c42ece44569 (patch)
treefa2335187dbd4dbeaf20c7d06284f57994ad4fa1 /perl-install
parentb4d7984f4532f4a54783137ffb525b8068aaa794 (diff)
downloaddrakx-f06fc2cef872084dcca9d28230763c42ece44569.tar
drakx-f06fc2cef872084dcca9d28230763c42ece44569.tar.gz
drakx-f06fc2cef872084dcca9d28230763c42ece44569.tar.bz2
drakx-f06fc2cef872084dcca9d28230763c42ece44569.tar.xz
drakx-f06fc2cef872084dcca9d28230763c42ece44569.zip
fix type "smb" vs "smbfs", and handle options in fs::mount
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 88792c312..4de3524c3 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -40,6 +40,9 @@ sub read_fstab {
1;
}
} split(',', $options));
+ } elsif ($type eq 'smb') {
+ # prefering type "smbfs" over "smb"
+ $type = 'smbfs';
}
my $h = { device => $dev, mntpoint => $mntpoint, type => $type, options => $options, if_($all_options, freq => $freq, passno => $passno) };
@@ -88,7 +91,7 @@ sub add2all_hds {
foreach (@l) {
my $s =
isNfs($_) ? 'nfss' :
- isThisFs('smbfs', $_) || isThisFs('smb', $_) ? 'smbs' :
+ isThisFs('smbfs', $_) ? 'smbs' :
'special';
push @{$all_hds->{$s}}, $_;
}
@@ -564,15 +567,15 @@ sub formatMount_all {
}
sub mount {
- my ($dev, $where, $fs, $rdonly) = @_;
- log::l("mounting $dev on $where as type $fs");
+ my ($dev, $where, $fs, $rdonly, $options) = @_;
+ log::l("mounting $dev on $where as type $fs, options $options");
-d $where or mkdir_p($where);
my @fs_modules = qw(vfat hfs romfs ufs reiserfs xfs jfs ext3);
- if (member($fs, 'smb', 'nfs') && $::isStandalone) {
- system('mount', $dev, $where) == 0 or die _("mount failed");
+ if (member($fs, 'smb', 'smbfs', 'nfs') && $::isStandalone) {
+ system('mount', $dev, $where, '-o', $options) == 0 or die _("mount failed");
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';
@@ -664,7 +667,7 @@ sub mount_part {
} elsif (loopback::carryRootLoopback($part)) {
$mntpoint = "/initrd/loopfs";
}
- mount($dev, $mntpoint, type2fs($part), $rdonly);
+ mount($dev, $mntpoint, type2fs($part), $rdonly, $part->{options});
rmdir "$mntpoint/lost+found";
}
}