summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2006-06-20 15:52:38 +0000
committerAntoine Ginies <aginies@mandriva.com>2006-06-20 15:52:38 +0000
commit48fd0caf51d04e7956618f632173a6c81f31e870 (patch)
tree3927c08d6ecd9d0b5307040aac7a672c7379f354
parent3d6553c585664cd5a37a8ebbd7fbe265b98be868 (diff)
downloaddrakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.tar
drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.tar.gz
drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.tar.bz2
drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.tar.xz
drakwizard-48fd0caf51d04e7956618f632173a6c81f31e870.zip
fix ask_warn problem
-rw-r--r--drakwizard.spec5
-rwxr-xr-xftp_wizard/Proftpd.pm9
-rw-r--r--ldap_wizard/Ldap.pm21
-rwxr-xr-xnfs_wizard/NFS.pm3
-rwxr-xr-xpostfix_wizard/Postfix.pm15
-rw-r--r--time_wizard/Ntp.pm1
-rwxr-xr-xweb_wizard/Apache.pm5
7 files changed, 34 insertions, 25 deletions
diff --git a/drakwizard.spec b/drakwizard.spec
index fd07773d..ea8b3e7d 100644
--- a/drakwizard.spec
+++ b/drakwizard.spec
@@ -1,6 +1,6 @@
%define name drakwizard
%define version 3.0
-%define release %mkrel 25
+%define release %mkrel 26
Name: %{name}
Version: %{version}
@@ -92,6 +92,9 @@ rm -rf $RPM_BUILD_DIR/$RPM_PACKAGE_NAME
%_datadir/wizards/proxy_wizard
%changelog
+* Tue Jun 20 2006 Antoine Ginies <aginies@mandriva.com> 3.0-26mdv2007.0
+
+
* Thu Mar 16 2006 Antoine Ginies <aginies@mandriva.com> 3.0-25mdk
- remove default password in kolab server
diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm
index 9ac8aaed..2f5cba0d 100755
--- a/ftp_wizard/Proftpd.pm
+++ b/ftp_wizard/Proftpd.pm
@@ -29,6 +29,7 @@ use services;
use MDK::Wizard::Wizcommon;
my $wiz = MDK::Wizard::Wizcommon->new;
+my $in = interactive->vnew;
my $file = "/etc/proftpd.conf";
@@ -88,7 +89,7 @@ $o->{pages} = {
],
complete => sub {
if ($o->{var}{wiz_ftp_external} == 0 && $o->{var}{wiz_ftp_internal} == 0) {
- $::in->ask_warn(N("Error"), N("Please choose whether to allow a connection to FTP server from internal or external hosts."));
+ $in->ask_warn(N("Error"), N("Please choose whether to allow a connection to FTP server from internal or external hosts."));
return 1;
} else { return 0 }
},
@@ -107,10 +108,10 @@ $o->{pages} = {
],
complete => sub {
if (!any { /bash/ } cat_("/etc/shells")) {
- $::in->ask_warn(N("Error"), N("I can't find bash in list of shells! It seems you have modified it by hand! Please correct."));
+ $in->ask_warn(N("Error"), N("I can't find bash in list of shells! It seems you have modified it by hand! Please correct."));
return 1;
}
- if (!$o->{var}{wiz_server_name}) { $::in->ask_warn(N("Error"), N("Need a server name")); return 1; }
+ if (!$o->{var}{wiz_server_name}) { $in->ask_warn(N("Error"), N("Need a server name")); return 1; }
},
next => 'options_step2',
},
@@ -128,7 +129,7 @@ $o->{pages} = {
{ label => N("Allow FTP resume:"), type => 'bool', val => \$o->{var}{wiz_ftp_resume} },
{ label => N("Allow FXP:"), type => 'bool', val => \$o->{var}{wiz_ftp_fxp} },
],
- complete => sub { if ($o->{var}{wiz_port} !~ /^\d+$/) { $::in->ask_warn(N('Error'), N('FTP Port should be a number.')); return 1; } },
+ complete => sub { if ($o->{var}{wiz_port} !~ /^\d+$/) { $in->ask_warn(N('Error'), N('FTP Port should be a number.')); return 1; } },
next => 'summary',
},
warning_dhcp => {
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;
diff --git a/nfs_wizard/NFS.pm b/nfs_wizard/NFS.pm
index 89193bd9..001def82 100755
--- a/nfs_wizard/NFS.pm
+++ b/nfs_wizard/NFS.pm
@@ -29,6 +29,7 @@ use services;
use MDK::Wizard::Wizcommon;
my $wiz = new MDK::Wizard::Wizcommon;
+my $in = interactive->vnew;
my $o = {
name => N("NFS Wizard"),
@@ -59,7 +60,7 @@ $o->{pages} = {
],
complete => sub {
if (! -d $o->{var}{wiz_nfs_dir}) {
- $::in->ask_warn(N("Error"), N("The path you entered does not exist."));
+ $in->ask_warn(N("Error"), N("The path you entered does not exist."));
return 1;
}
},
diff --git a/postfix_wizard/Postfix.pm b/postfix_wizard/Postfix.pm
index 2565c688..45c0552c 100755
--- a/postfix_wizard/Postfix.pm
+++ b/postfix_wizard/Postfix.pm
@@ -44,6 +44,7 @@ use Data::Dumper;
print Dumper($postfix);
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 $wiz_postfix_etc = "/etc/sysconfig/wizard_postfix";
@@ -118,7 +119,7 @@ $o->{pages} = {
pre => sub {
$postfix->{relayhost} and $o->{var}{wiz_type} = 2;
if (-f $wiz_postfix_etc) {
- $::in->ask_warn(N("Information"), N("It seems you previously setup a Postfix configuration. This wizard will re-read your old configuration, and show you the Postfix server type you choose"));
+ $in->ask_warn(N("Information"), N("It seems you previously setup a Postfix configuration. This wizard will re-read your old configuration, and show you the Postfix server type you choose")) or $in->exit;
my $data = cat_($wiz_postfix_etc);
# detect old Postfix type
my ($old_type) = $data =~ /type=(\d)/;
@@ -161,11 +162,11 @@ $o->{pages} = {
],
complete => sub {
if (!$o->{var}{wiz_smtpd_banner}) {
- $::in->ask_warn(N('Error'), N('Please provide an Smtpd banner.')); return 1; }
+ $in->ask_warn(N('Error'), N('Please provide an Smtpd banner.')); return 1; }
if (!$o->{var}{wiz_myhostname}) {
- $::in->ask_warn(N('Error'), N('You must provide an internet hostname of this mail system.')); return 1; }
+ $in->ask_warn(N('Error'), N('You must provide an internet hostname of this mail system.')); return 1; }
if (!$o->{var}{wiz_mydomain}) {
- $::in->ask_warn(N('Error'), N('You must specify the local internet domain name.')); return 1; }
+ $in->ask_warn(N('Error'), N('You must specify the local internet domain name.')); return 1; }
},
},
main_server => {
@@ -182,7 +183,7 @@ $o->{pages} = {
],
complete => sub {
if ($o->{var}{wiz_masquerade_domains} !~ /\w+\.\w+\s\w+\.\w+$/ and $o->{var}{wiz_masquerade_domains}) {
- $::in->ask_warn(N("Error"), N("Masquerade should be a valid domain name such as \"domain_to_masquerade.com with_this_domain.com\"!"));
+ $in->ask_warn(N("Error"), N("Masquerade should be a valid domain name such as \"domain_to_masquerade.com with_this_domain.com\"!"));
return 1;
} else { return 0; };
},
@@ -198,7 +199,7 @@ $o->{pages} = {
{ label => N('Relay host:'), val => \$o->{var}{wiz_relayhost}, help => 'The default host to send non-local mail to when no entry is matched in the optional transport(5) table. ie: relayhost = [gateway.my.domain], relayhost = uucphost, relayhost = [an.ip.add.ress].' },
{ label => N('Relay domains:'), val => \$o->{var}{wiz_relay_domains}, help => N('What destination domains (and subdomains thereof) this system will relay mail to. ie: mydomain.com') },
],
- complete => sub { if (!$o->{var}{wiz_relayhost}) { $::in->ask_warn(N('Error'), N('Need a relayhost.')); return 1; } else { return 0; }; },
+ complete => sub { if (!$o->{var}{wiz_relayhost}) { $in->ask_warn(N('Error'), N('Need a relayhost.')); return 1; } else { return 0; }; },
next => 'message_config',
},
network_config => {
@@ -216,7 +217,7 @@ $o->{pages} = {
{ label => N('my destination:'), val => \$o->{var}{wiz_mydestination}, help => N('The list of domains that are delivered via the $local_transport mail delivery transport. ie: $myhostname, localhost.$mydomain, /etc/postfix/destinations') },
{ label => N('my networks:'), val => \$o->{var}{wiz_mynetworks}, help => N('The list of trusted SMTP clients. ie: 127.0.0.0/32, 192.168.1.0/24') },
],
- complete => sub { if (!$o->{var}{wiz_mynetworks}) { $::in->ask_warn(N('Error'), N('This is the list of trusted SMTP clients. For security reason, please provide one. ie: 127.0.0.0/32, 192.168.1.0/24')); return 1; } else { return 0; }; },
+ complete => sub { if (!$o->{var}{wiz_mynetworks}) { $in->ask_warn(N('Error'), N('This is the list of trusted SMTP clients. For security reason, please provide one. ie: 127.0.0.0/32, 192.168.1.0/24')); return 1; } else { return 0; }; },
post => sub {
if ($o->{var}{wiz_type} == 1) {
return 'summary_main' ;
diff --git a/time_wizard/Ntp.pm b/time_wizard/Ntp.pm
index 1772f9c0..23d8929d 100644
--- a/time_wizard/Ntp.pm
+++ b/time_wizard/Ntp.pm
@@ -31,6 +31,7 @@ use MDK::Wizard::Wizcommon_gtk2;
use timezone;
my $wiz = new MDK::Wizard::Wizcommon;
+my $in = interactive->vnew;
my $o = {
name => N("Time wizard"),
diff --git a/web_wizard/Apache.pm b/web_wizard/Apache.pm
index dcb68dc8..ce6f99d4 100755
--- a/web_wizard/Apache.pm
+++ b/web_wizard/Apache.pm
@@ -30,6 +30,7 @@ use MDK::Wizard::Wizcommon;
use MDK::Wizard::Varspaceval;
my $wiz = new MDK::Wizard::Wizcommon;
+my $in = interactive->vnew;
my $file = "/etc/httpd/conf/httpd.conf";
my $root;
@@ -110,7 +111,7 @@ $o->{pages} = {
},
complete => sub {
if (!$o->{var}{user_dir}) {
- $::in->ask_warn(N('Error'), N('You must specify a user directory.')); return 1;
+ $in->ask_warn(N('Error'), N('You must specify a user directory.')); return 1;
} else { return 0; }; },
data => [
{ label => N("user http sub-directory: ~/"), help => N("Type the name of the directory users should create in their homes (without ~/) to get it available via http://www.yourserver.com/~user"), val => \$o->{var}{user_dir} },
@@ -125,7 +126,7 @@ $o->{pages} = {
],
complete => sub {
if (! -d $o->{var}{shared_dir}) {
- $::in->ask_warn(N("Error"), N("The path you entered does not exist.")); return 1; }
+ $in->ask_warn(N("Error"), N("The path you entered does not exist.")); return 1; }
else { return 0; };
},
next => 'summary',