summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-08-30 10:27:59 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-08-30 10:27:59 +0000
commit327eeae76d4a1e73091b329ccfea5da521d42e3e (patch)
tree2e44a619a3aa30092f9e8b761b7620df3fa22fa9 /perl-install/standalone
parentbaef2712ae3709466f3187c404ca07f61b7d8df5 (diff)
downloaddrakx-327eeae76d4a1e73091b329ccfea5da521d42e3e.tar
drakx-327eeae76d4a1e73091b329ccfea5da521d42e3e.tar.gz
drakx-327eeae76d4a1e73091b329ccfea5da521d42e3e.tar.bz2
drakx-327eeae76d4a1e73091b329ccfea5da521d42e3e.tar.xz
drakx-327eeae76d4a1e73091b329ccfea5da521d42e3e.zip
in case of all_squash use anongid=65534 and anongid=65534
Diffstat (limited to 'perl-install/standalone')
-rw-r--r--perl-install/standalone/draknfs17
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/standalone/draknfs b/perl-install/standalone/draknfs
index 851199ced..07fa5bb76 100644
--- a/perl-install/standalone/draknfs
+++ b/perl-install/standalone/draknfs
@@ -348,6 +348,9 @@ sub add_modify_entry {
$luserid->signal_connect(changed => sub {
if ($luserid->get_text =~ /$userid_data->{root_squash}/) {
$_->set_sensitive(1) foreach $anongid, $anonuid;
+ } elsif ($luserid->get_text =~ /$userid_data->{all_squash}/) {
+ $_->set_sensitive(0) foreach $anongid, $anonuid;
+ $_->set_text("65534") foreach $anongid, $anonuid;
} else {
$_->set_text("") foreach $anongid, $anonuid;
$_->set_sensitive(0) foreach $anongid, $anonuid;
@@ -406,13 +409,13 @@ sub add_modify_entry {
ok_clicked => sub {
my ($anonu, $anong);
if ($anonuid->get_text) {
- my ($uid) = $anonuid->get_text =~ /\[(\S*)\]/;
- $anonu = "anonuid=" . $uid;
+ my ($uid) = $anonuid->get_text =~ /\[(\S*)\]/;
+ $anonu = "anonuid=" . $uid;
}
if ($anongid->get_text) {
my ($gid) = $anongid->get_text =~ /\[(\S*)\]/;
$anong = "anongid=" . $gid;
- }
+ }
if ($lsync->get_text =~ /yes/) { $lsync_data = "sync" } elsif ($lsync->get_text =~ /no/) { $lsync_data = "async" } else { undef $lsync_data }
if ($lr->get_text =~ /yes/) { $lr_data = "ro" } elsif ($lr->get_text =~ /no/) { $lr_data = "rw" } else { undef $lr_data }
if ($lsecure->get_text =~ /yes/) { $lsecure_data = "secure" } elsif ($lsecure->get_text =~ /no/) { $lsecure_data = "insecure" } else { undef $lsecure_data }
@@ -420,12 +423,16 @@ sub add_modify_entry {
my $luserid_toput;
if ($luserid->get_text =~ /$userid_data->{no_root_squash}/) {
$luserid_toput = "no_root_squash";
+ undef $anong; undef $anonu;
} elsif ($luserid->get_text =~ /$userid_data->{root_squash}/) {
$luserid_toput = "root_squash";
} elsif ($luserid->get_text =~ /$userid_data->{no_all_squash}/) {
$luserid_toput = "no_all_squash";
+ undef $anong; undef $anonu;
} elsif ($luserid->get_text =~ /$userid_data->{all_squash}/) {
$luserid_toput = "all_squash";
+ $anong = "anongid=65534";
+ $anonu = "anonuid=65534";
}
my $all_right = join(",", grep { defined $_ } $luserid_toput, $anonu, $anong, $lsync_data, $lsecure_data, $lr_data);
@@ -574,7 +581,9 @@ my $menu = $factory->get_widget('<main>');
my $okcancel = create_okcancel({
cancel_clicked => sub { ugtk2->exit },
- ok_clicked => sub { &write_conf; ugtk2->exit },
+ ok_clicked => sub { &write_conf;
+ run_program::raw({ detach => 1 }, "service nfs reload");
+ ugtk2->exit },
},
);