diff options
author | Olivier Blin <oblin@mandriva.org> | 2006-01-03 16:52:13 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2006-01-03 16:52:13 +0000 |
commit | 9518e6f02ba555d798877604c8f50daf44486f45 (patch) | |
tree | fe6dc703ac5168315a12ac1e59fa562d28c3e29f /drakwizard.pl | |
parent | d934ba7f5ed503f055fe29633fa96c658cc8151b (diff) | |
download | drakwizard-9518e6f02ba555d798877604c8f50daf44486f45.tar drakwizard-9518e6f02ba555d798877604c8f50daf44486f45.tar.gz drakwizard-9518e6f02ba555d798877604c8f50daf44486f45.tar.bz2 drakwizard-9518e6f02ba555d798877604c8f50daf44486f45.tar.xz drakwizard-9518e6f02ba555d798877604c8f50daf44486f45.zip |
rename wizards hash to avoid confusion
Diffstat (limited to 'drakwizard.pl')
-rwxr-xr-x | drakwizard.pl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drakwizard.pl b/drakwizard.pl index fe6425c2..df20ec4b 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -38,7 +38,7 @@ $::Wiz_dir = '/usr/share/wizards/'; $::Wiz_more_dir = "/etc/wizard.d/"; my $in = interactive->vnew; -my %wiz = ( +my %all_wizards = ( apache2 => [ 'Apache', N("Apache2 web server"), { ver => 2 } ], samba => [ 'Samba', N("Samba server") ], sambashare => [ 'Sambashare', N("Manage Samba share") ], @@ -64,22 +64,22 @@ foreach my $file (glob_("$::Wiz_more_dir/*.conf")) { next unless -f $file; my %tmp=getVarsFromSh($file); - $wiz{lc($file)} = [ $tmp{NAME}, $tmp{DESCRIPTION} ]; + $all_wizards{lc($file)} = [ $tmp{NAME}, $tmp{DESCRIPTION} ]; } @ARGV = grep { ! /^--/ } @ARGV; -if (!defined($wiz{$ARGV[0]})) { +if (!defined($all_wizards{$ARGV[0]})) { $in->ask_from( N("Drakwizard wizard selection"), N("Please select a wizard"), - [{ val => \$ARGV[0], list => [sort { $wiz{$a}[1] cmp $wiz{$b}[1] } keys %wiz], format => sub { $wiz{$_[0]}[1] }}] + [{ val => \$ARGV[0], list => [sort { $all_wizards{$a}[1] cmp $all_wizards{$b}[1] } keys %all_wizards], format => sub { $all_wizards{$_[0]}[1] }}] ); - push @ARGV, @{$wiz{$ARGV[0]}}[0,2]; + push @ARGV, @{$all_wizards{$ARGV[0]}}[0,2]; } -require "MDK/Wizard/$wiz{$ARGV[0]}[0].pm"; +require "MDK/Wizard/$all_wizards{$ARGV[0]}[0].pm"; -my ($wiz, $err) = "MDK::Wizard::$wiz{$ARGV[0]}[0]"->new($wiz{$ARGV[0]}[2]); +my ($wiz, $err) = "MDK::Wizard::$all_wizards{$ARGV[0]}[0]"->new($all_wizards{$ARGV[0]}[2]); if ($err) { $::Wizard_finished = 1; $in->ask_okcancel(N("Error"), translate($err)); |