diff options
author | Antoine Ginies <aginies@mandriva.com> | 2006-06-20 15:52:38 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2006-06-20 15:52:38 +0000 |
commit | 48fd0caf51d04e7956618f632173a6c81f31e870 (patch) | |
tree | 3927c08d6ecd9d0b5307040aac7a672c7379f354 /ldap_wizard | |
parent | 3d6553c585664cd5a37a8ebbd7fbe265b98be868 (diff) | |
download | drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.tar drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.tar.gz drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.tar.bz2 drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.tar.xz drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.zip |
fix ask_warn problem
Diffstat (limited to 'ldap_wizard')
-rw-r--r-- | ldap_wizard/Ldap.pm | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ldap_wizard/Ldap.pm b/ldap_wizard/Ldap.pm index 5a9f7386..a58de7d8 100644 --- a/ldap_wizard/Ldap.pm +++ b/ldap_wizard/Ldap.pm @@ -24,6 +24,7 @@ use Net::LDAP::Util qw(ldap_error_text); #} my $wiz = new MDK::Wizard::Wizcommon; +my $in = interactive->vnew; my $wiz_domain_name = $wiz->{net}->network_get("DOMAINNAME"); my $wiz_host_name = $wiz->{net}->network_get("HOSTNAME"); my $DOMAINNAME = chomp_(`domainname`); @@ -107,14 +108,14 @@ $o->{pages} = { }, post => sub { if ($o->{var}{wiz_level} == 2) { - ! -f $conf_file and $::in->ask_warn(N("Error"), N("You must setup an Ldap server first.")) and return 'set_srv'; + ! -f $conf_file and $in->ask_warn(N("Error"), N("You must setup an Ldap server first.")) and return 'set_srv'; return 'add_userposix'; } if ($o->{var}{wiz_level} == 1) { -f $conf_file and return 'resume'; } if ($o->{var}{wiz_level} == 3) { - ! -f $conf_file and $::in->ask_warn(N("Error"), N("You must setup an Ldap server first.")) and return 'set_srv'; + ! -f $conf_file and $in->ask_warn(N("Error"), N("You must setup an Ldap server first.")) and return 'set_srv'; return 'del_conf'; } }, @@ -141,15 +142,15 @@ $o->{pages} = { ], complete => sub { if (!$o->{var}{sn}) { - $::in->ask_warn(N("Error"), N("You must enter a valid First Name.")); + $in->ask_warn(N("Error"), N("You must enter a valid First Name.")); return 1; } if (!$o->{var}{cn}) { - $::in->ask_warn(N("Error"), N("You must enter a valid Name.")); + $in->ask_warn(N("Error"), N("You must enter a valid Name.")); return 1; } if (!$o->{var}{uid}) { - $::in->ask_warn(N("Error"), N("You must enter a valid User Name.")); + $in->ask_warn(N("Error"), N("You must enter a valid User Name.")); return 1; } }, @@ -164,12 +165,12 @@ $o->{pages} = { ], complete => sub { if (!$o->{var}{uidpass}) { - $::in->ask_warn(N("Error"), N("You must enter a password for LDAP.")); + $in->ask_warn(N("Error"), N("You must enter a password for LDAP.")); $o->{var}{uidpass} = ""; return 1; } if ($o->{var}{uidpass} ne $o->{var}{uidpass2}) { - $::in->ask_warn(N("Error"), N("The passwords do not match")); + $in->ask_warn(N("Error"), N("The passwords do not match")); $o->{var}{uidpass} = ""; $o->{var}{uidpass2} = ""; return 1; @@ -193,16 +194,16 @@ $o->{pages} = { }, complete => sub { if (!$o->{var}{suffix} || $o->{var}{suffix} !~ /dc/) { - $::in->ask_warn(N("Error"), N("You must enter a valid LDAP directory tree.")); + $in->ask_warn(N("Error"), N("You must enter a valid LDAP directory tree.")); return 1; } if (!$o->{var}{rootpass}) { - $::in->ask_warn(N("Error"), N("You must enter a password for LDAP.")); + $in->ask_warn(N("Error"), N("You must enter a password for LDAP.")); $o->{var}{rootpass} = ""; return 1; } if ($o->{var}{rootpass} ne $o->{var}{rootpass2}) { - $::in->ask_warn(N("Error"), N("The passwords do not match")); + $in->ask_warn(N("Error"), N("The passwords do not match")); $o->{var}{rootpass} = ""; $o->{var}{rootpass2} = ""; return 1; |