summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdrakwizard.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/drakwizard.pl b/drakwizard.pl
index 7ddcdeb1..e9731338 100755
--- a/drakwizard.pl
+++ b/drakwizard.pl
@@ -20,7 +20,7 @@
use lib qw(/usr/lib/libDrakX);
#use strict;
-use vars qw($wizard_title $lib_script $perl_module %variable $in $welcome);
+use vars qw($wizard_title $lib_script $perl_module %variable $in $welcome $rpm);
use XML::Parser;
use standalone;
@@ -45,13 +45,20 @@ sub get_parameter {
my $common_freetext_chooser;
my %actions = (
Wizard => sub {
- ($wizard_title, $lib_script, $perl_module) = @{$leaf}{qw(wizardTitle libScript perlModule)};
+ ($wizard_title, $lib_script, $perl_module, $rpm) = @{$leaf}{qw(wizardTitle libScript perlModule rpm)};
if ($perl_module) {
require $perl_module;
}
if ($perl_module =~ /.*\/(.*)\.pm/) {
$::perl_module_name = $1;
}
+ if ($rpm) {
+ if (!$in->do_pkgs->is_installed($rpm)) {
+ $in->ask_okcancel("error", "$rpm is not installed\nClick ok to add it or cancel to exit") and
+ $in->do_pkgs->install($rpm) or
+ $in->exit;
+ }
+ }
},
Variable => sub {
$variable{$leaf->{name}} = $leaf->{shellVariable};