summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-11-15 17:45:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-11-15 17:45:04 +0000
commit766b038e6286472d20c334860d189441dcc44f92 (patch)
tree1149d6cce517d589cc730024b2428f20d1fc8b22 /perl-install
parentd3157a39407cc1959cff7bbd001ea9e155ae69ba (diff)
downloaddrakx-766b038e6286472d20c334860d189441dcc44f92.tar
drakx-766b038e6286472d20c334860d189441dcc44f92.tar.gz
drakx-766b038e6286472d20c334860d189441dcc44f92.tar.bz2
drakx-766b038e6286472d20c334860d189441dcc44f92.tar.xz
drakx-766b038e6286472d20c334860d189441dcc44f92.zip
handle "users" the way "user" is handled
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/diskdrake/interactive.pm11
-rw-r--r--perl-install/fs/mount_options.pm15
2 files changed, 14 insertions, 12 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index e2c666212..8651fc44d 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -950,13 +950,13 @@ sub Loopback {
sub Options {
my ($in, $hd, $part, $all_hds) = @_;
- my @simple_options = qw(user noauto supermount username= password=);
+ my @simple_options = qw(users noauto supermount username= password=);
my (undef, $user_implies) = fs::mount_options::list();
my ($options, $unknown) = fs::mount_options::unpack($part);
my %help = fs::mount_options::help();
- my $prev_user = $options->{user};
+ my %prev_options = %$options;
$in->ask_from(N("Mount options"),
'',
[
@@ -967,9 +967,10 @@ sub Options {
{ label => N("Various"), val => \$unknown, advanced => 1 },
],
changed => sub {
- if ($prev_user != $options->{user}) {
- $prev_user = $options->{user};
- $options->{$_} = $options->{user} foreach @$user_implies;
+ if (my $user = find { $prev_options{$_} != $options->{$_} } 'users', 'user') {
+ $options->{$user eq 'user' ? 'users' : 'user'} = 0 if $options->{$user}; # we don't want both user and users
+ $options->{$_} = $options->{$user} foreach @$user_implies;
+ %prev_options = %$options;
}
if ($options->{encrypted}) {
# modify $part->{options} for the check
diff --git a/perl-install/fs/mount_options.pm b/perl-install/fs/mount_options.pm
index e31db1653..608c830a9 100644
--- a/perl-install/fs/mount_options.pm
+++ b/perl-install/fs/mount_options.pm
@@ -48,8 +48,8 @@ sub unpack {
my %options = map { $_ => '' } keys %$non_defaults;
my @unknown;
foreach (split(",", $packed_options)) {
- if ($_ eq 'user') {
- $options{$_} = 1 foreach 'user', @$user_implies;
+ if (member($_, 'user', 'users')) {
+ $options{$_} = 1 foreach $_, @$user_implies;
} elsif (exists $non_defaults->{$_}) {
$options{$_} = 1;
} elsif ($defaults->{$_}) {
@@ -84,8 +84,9 @@ sub pack_ {
push @l, 'umask=' . min(@umasks);
}
- if (delete $options->{user}) {
- push @l, 'user';
+ if (my $user = find { delete $options->{$_} } 'users', 'user') {
+ push @l, $user;
+ delete $options->{user};
foreach (@$user_implies) {
if (!delete $options->{$_}) {
# overriding
@@ -134,11 +135,11 @@ have suidperl(1) installed.)"),
'supermount' => '',
- 'user' => N("Allow an ordinary user to mount the file system. The
+ 'users' => N("Allow an ordinary user to mount the file system. The
name of the mounting user is written to mtab so that he can unmount the file
system again. This option implies the options noexec, nosuid, and nodev
(unless overridden by subsequent options, as in the option line
-user,exec,dev,suid )."),
+user,exec,dev,suid )."),
'usrquota' => N("Enable user disk quota accounting, and optionally enforce limits"),
@@ -228,7 +229,7 @@ sub set_default {
});
}
if (fs::type::can_be_this_fs_type($part, 'iso9660')) {
- put_in_hash($options, { user => 1, noexec => 0, 'iocharset=' => $opts{iocharset} });
+ put_in_hash($options, { users => 1, noexec => 0, 'iocharset=' => $opts{iocharset} });
}
if ($part->{fs_type} eq 'reiserfs') {
$options->{notail} = 1;