summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs.pm23
-rw-r--r--perl-install/fsedit.pm2
-rwxr-xr-xperl-install/standalone/diskdrake2
3 files changed, 20 insertions, 7 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';
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 5aa41b797..7e1487575 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -75,7 +75,7 @@ sub typeOfPart {
#- Functions
#-######################################################################################
sub empty_all_hds {
- { hds => [], lvms => [], raids => [], loopbacks => [], raw_hds => [] };
+ { hds => [], lvms => [], raids => [], loopbacks => [], raw_hds => [], nfs => [], smb => [] };
}
sub recompute_loopbacks {
my ($all_hds) = @_;
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index 6cee947b7..930fc7fe3 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -65,7 +65,7 @@ I'll try to go on blanking bad partitions"), $err]);
$SIG{__DIE__} = sub { my $m = chomp_($_[0]); log::l("ERROR: $m") };
my $fstab = [ fsedit::get_all_fstab($all_hds) ];
-$all_hds->{raw_hds} = [ fs::raw_hds() ];
+fs::get_raw_hds('', $all_hds);
fs::get_all_mntpoints_from_fstab($all_hds);
fs::check_mounted($fstab);