summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-18 23:29:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-18 23:29:21 +0000
commit77ad439af3d100ea181a2f45cecd8f32d2129b6b (patch)
tree746c8ca0867379b2f490d62b68a8829f8b3f408d /perl-install/fs.pm
parente4baffd98ca6ec03ad1942ab398abc78d9d73ec4 (diff)
downloaddrakx-backup-do-not-use-77ad439af3d100ea181a2f45cecd8f32d2129b6b.tar
drakx-backup-do-not-use-77ad439af3d100ea181a2f45cecd8f32d2129b6b.tar.gz
drakx-backup-do-not-use-77ad439af3d100ea181a2f45cecd8f32d2129b6b.tar.bz2
drakx-backup-do-not-use-77ad439af3d100ea181a2f45cecd8f32d2129b6b.tar.xz
drakx-backup-do-not-use-77ad439af3d100ea181a2f45cecd8f32d2129b6b.zip
basic nfs/smb handling in diskdrake
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm23
1 files changed, 18 insertions, 5 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index c6033dc15..8e5c61b69 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -24,12 +24,21 @@ sub add_options(\$@) {
$$option = join(',', keys %l) || "defaults";
}
-sub raw_hds {
- detect_devices::floppies(), detect_devices::cdroms(),
- (map { $_->{device} .= '4'; $_ } detect_devices::zips());
+
+sub get_raw_hds {
+ my ($prefix, $all_hds) = @_;
+
+ $all_hds->{raw_hds} =
+ [
+ detect_devices::floppies(), detect_devices::cdroms(),
+ (map { $_->{device} .= '4'; $_ } detect_devices::zips())
+ ];
+ my @fstab = read_fstab("$prefix/etc/fstab");
+ $all_hds->{nfss} = [ grep { isNfs($_) } @fstab ];
+ $all_hds->{smbs} = [ grep { isThisFs('smb', $_) } @fstab ];
}
-sub read_fstab($) {
+sub read_fstab {
my ($file) = @_;
local *F;
@@ -88,7 +97,7 @@ sub mount_options_unpack {
my %per_fs = (
iso9660 => [ qw(unhide) ],
vfat => [ qw(umask=0) ],
- nfs => [ 'rsize=8192,wsize=8192' ],
+ nfs => [ qw(rsize=8192 wsize=8192) ],
);
while (my ($fs, $l) = each %per_fs) {
isThisFs($fs, $part) || $part->{type} eq 'auto' && member($fs, @auto_fs) or next;
@@ -114,6 +123,10 @@ sub mount_options_unpack {
push @unknown, $_;
}
}
+ # merge those, for cleaner help
+ $options{'rsize=8192,wsize=8192'} = delete $options{'rsize=8192'} && delete $options{'wsize=8192'}
+ if exists $options{'rsize=8192'};
+
$options{autofs} = 1 if $part->{type} eq 'autofs';
$options{supermount} = 1 if $part->{type} eq 'supermount';