summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-03-23 11:01:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-03-23 11:01:18 +0000
commit063fbe1dae400a8fb84d1e2c6f26db52972908be (patch)
tree5c01c57093f9202bf7e5c7ac2a8391e1dd54520b /perl-install/fs.pm
parent5a9b16239716ce14fb9c82831ca61dccc972875a (diff)
downloaddrakx-063fbe1dae400a8fb84d1e2c6f26db52972908be.tar
drakx-063fbe1dae400a8fb84d1e2c6f26db52972908be.tar.gz
drakx-063fbe1dae400a8fb84d1e2c6f26db52972908be.tar.bz2
drakx-063fbe1dae400a8fb84d1e2c6f26db52972908be.tar.xz
drakx-063fbe1dae400a8fb84d1e2c6f26db52972908be.zip
- do not pass options is_removable to set_default_options() since it is not a global options
- replace it with a flag in the part or raw_hd - set is_removable for part from usb drive - ensure usb partitions are not checked at boot time (freq field in fstab)
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 11679bf1e..33ea9ab23 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -223,7 +223,7 @@ sub prepare_write_fstab {
my ($freq, $passno) =
exists $_->{freq} ?
($_->{freq}, $_->{passno}) :
- isTrueFS($_) && $_->{options} !~ /encryption=/ ?
+ isTrueFS($_) && $_->{options} !~ /encryption=/ && !$_->{is_removable} ?
(1, $_->{mntpoint} eq '/' ? 1 : loopback::carryRootLoopback($_) ? 0 : 2) :
(0, 0);
@@ -444,11 +444,11 @@ user,exec,dev,suid )."),
sub set_default_options {
my ($part, %opts) = @_;
- #- opts are: is_removable useSupermount security iocharset codepage
+ #- opts are: useSupermount security iocharset codepage
my ($options, $unknown) = mount_options_unpack($part);
- if ($opts{is_removable}) {
+ if ($part->{is_removable}) {
$options->{supermount} = $opts{useSupermount} && !($opts{useSupermount} eq 'magicdev' && $part->{media_type} eq 'cdrom');
$part->{type} = !$options->{supermount} ? 'auto' :
$part->{media_type} eq 'cdrom' ? 'udf:iso9660' : 'ext2:vfat';
@@ -482,7 +482,7 @@ sub set_default_options {
put_in_hash($options, {
user => 1, noexec => 0,
- }) if $opts{is_removable};
+ }) if $part->{is_removable};
put_in_hash($options, {
'umask=0' => $opts{security} < 3, 'umask=0022' => $opts{security} < 4,
@@ -526,10 +526,8 @@ sub set_all_default_options {
my ($all_hds, %opts) = @_;
#- opts are: useSupermount security iocharset codepage
- my @removables = @{$all_hds->{raw_hds}};
-
foreach my $part (fsedit::get_really_all_fstab($all_hds)) {
- set_default_options($part, %opts, is_removable => member($part, @removables));
+ set_default_options($part, %opts);
}
}
@@ -550,6 +548,9 @@ sub get_raw_hds {
my ($prefix, $all_hds) = @_;
push @{$all_hds->{raw_hds}}, detect_devices::removables();
+ $_->{is_removable} = 1 foreach @{$all_hds->{raw_hds}};
+ $_->{is_removable} = 1 foreach map { partition_table::get_normal_parts($_) } grep { $_->{usb_media_type} } @{$all_hds->{hds}};
+
get_major_minor(@{$all_hds->{raw_hds}});
my @fstab = read_fstab($prefix, "/etc/fstab", 'keep_freq_passno');