diff options
Diffstat (limited to 'drakwizard.pl')
-rwxr-xr-x | drakwizard.pl | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drakwizard.pl b/drakwizard.pl index ac4389ff..d7899a33 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -47,14 +47,15 @@ if (!defined($ARGV[0])) { my %wiz = ( 1 => [$prefix."web_wizard/web.wiz", "Apache"], 2 => [$prefix."dhcp_wizard/dhcp.wiz", "Dhcp"], - 3 => [$prefix."dns_wizard/dns.wiz", "Dns"], - 4 => [$prefix."news_wizard/news.wiz", "News"], - 5 => [$prefix."nfs_wizard/nfs.wiz", "NFS"], - 6 => [$prefix."postfix_wizard/postfix.wiz", "Postfix"], - 7 => [$prefix."ftp_wizard/ftp.wiz", "Proftpd"], - 8 => [$prefix."samba_wizard/samba.wiz", "Samba"], - 9 => [$prefix."proxy_wizard/proxy.wiz", "Squid"], - 10 => [$prefix."time_wizard/time.wiz", "Time"] + 3 => [$prefix."dns_wizard/dns.wiz", "Dns (server)"], + 4 => [$prefix."client_wizard/client.wiz", "Dns (client)"], + 5 => [$prefix."news_wizard/news.wiz", "News"], + 6 => [$prefix."nfs_wizard/nfs.wiz", "NFS"], + 7 => [$prefix."postfix_wizard/postfix.wiz", "Postfix"], + 8 => [$prefix."ftp_wizard/ftp.wiz", "Proftpd"], + 9 => [$prefix."samba_wizard/samba.wiz", "Samba"], + 10 => [$prefix."proxy_wizard/proxy.wiz", "Squid"], + 11 => [$prefix."time_wizard/time.wiz", "Time"] ); $in->ask_from( _("Drakwizard wizard selection"), @@ -116,7 +117,7 @@ sub get_parameter { }, Variable => sub { $variable{$leaf->{name}} = $leaf->{shellVariable}; - $ENV{$leaf->{shellVariable}} = $leaf->{defaultValue}; + $ENV{$variable{$leaf->{name}}} = $leaf->{defaultValue}; }, Page => sub { !$welcome and $welcome = $page; @@ -153,7 +154,6 @@ sub get_parameter { : ($tag eq 'Boolean') ? 'bool' : ($leaf->{editable} eq 'true') ? 'entry' : 'field')}; - $leaf->{fillScript} =~ s/\\q/\"/g; }, Chooser => \&$common_freetext_chooser, Boolean => \&$common_freetext_chooser, @@ -213,13 +213,14 @@ sub display { @liste = @{$_->{Option}}; } } - if ($_->{main_order} eq 'entry' and $_->{fillScript}) { + if ($_->{fillScript}) { $ENV{$variable{$_->{variableName}}} = `. $lib_script && $_->{fillScript}`; } - elsif (!$ENV{$variable{$_->{variableName}}} && $_->{main_order} eq 'entry' && $_->{fillfunc}) { + elsif (!$ENV{$variable{$_->{variableName}}} && $_->{fillfunc}) { $ENV{$variable{$_->{variableName}}} = $::{$perl_module_name."::"}{"$_->{fillfunc}"}->(); } chomp($ENV{$variable{$_->{variableName}}}); + $ENV{$_->{variableName}} = $ENV{$variable{$_->{variableName}}}; ($_->{main_order} eq 'entry') ? { label => translate($_->{helpText}), val => \$ENV{$variable{$_->{variableName}}}, type => $_->{main_order} } : ($_->{main_order} eq 'bool') ? { val => \$ENV{$variable{$_->{variableName}}}, type => $_->{main_order}, |