summaryrefslogtreecommitdiffstats
path: root/nfs_wizard/NFS.pm
diff options
context:
space:
mode:
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");