summaryrefslogtreecommitdiffstats
path: root/nfs_wizard/NFS.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-07-27 07:43:02 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-07-27 07:43:02 +0000
commit49cf8a60fc16ecfd80d330a73d6d633e7affbbea (patch)
tree1f5561f26a073529cc041abdd673401b829366a9 /nfs_wizard/NFS.pm
parentcf4452688cb4c349f554ea10ccc5851702f05dcd (diff)
downloaddrakwizard-49cf8a60fc16ecfd80d330a73d6d633e7affbbea.tar
drakwizard-49cf8a60fc16ecfd80d330a73d6d633e7affbbea.tar.gz
drakwizard-49cf8a60fc16ecfd80d330a73d6d633e7affbbea.tar.bz2
drakwizard-49cf8a60fc16ecfd80d330a73d6d633e7affbbea.tar.xz
drakwizard-49cf8a60fc16ecfd80d330a73d6d633e7affbbea.zip
use new complete callback for better error managment (that is w/o garbaging the
wizard step history stack)
Diffstat (limited to 'nfs_wizard/NFS.pm')
-rwxr-xr-xnfs_wizard/NFS.pm16
1 files changed, 6 insertions, 10 deletions
diff --git a/nfs_wizard/NFS.pm b/nfs_wizard/NFS.pm
index df33d359..bd4072f5 100755
--- a/nfs_wizard/NFS.pm
+++ b/nfs_wizard/NFS.pm
@@ -54,10 +54,15 @@ $o->{pages} = {
},
nfs => {
name => N("NFS server") . "\n\n" .N("Directory which will be exported to NFS clients. This directory will be exported in read only mode. It denies any request which requires changes to the filesystem."),
- post => \&check,
data => [
{ label => N("Directory:"), val => \$o->{var}{wiz_nfs_dir} },
],
+ complete => sub {
+ if (! -d $o->{var}{wiz_nfs_dir}) {
+ $::in->ask_warn(N("Error"), N("The path you entered does not exist."));
+ return 1;
+ }
+ },
next => 'ask_level'
},
ask_level => {
@@ -79,11 +84,6 @@ $o->{pages} = {
next => 'summary'
},
- error_dir => {
- name => N("Error.") . "\n\n" . N("The path you entered does not exist."),
- ignore => 1,
- next => 'nfs'
- },
summary => {
name => N("The wizard collected the following parameters."),
pre => sub {
@@ -120,10 +120,6 @@ sub new {
}, $class;
}
-sub check {
- -d $o->{var}{wiz_nfs_dir} or return 'error_dir'
-}
-
sub network_mask {
my $wiz_ip_server = $wiz->{net}->itf_get("IPADDR");
my $mask = $wiz->{net}->itf_get("NETMASK");