diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-09-24 15:14:53 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-09-24 15:14:53 +0000 |
commit | 1a58abd155d2fb3cc2958f595fa7a3be4aeeec66 (patch) | |
tree | 3b80b869e8ba73b414aec29809eabf98ab5646cc /perl-install/modules/interactive.pm | |
parent | 8fe5ada6266a4d0ac2c1e413356ee149888db46f (diff) | |
download | drakx-backup-do-not-use-1a58abd155d2fb3cc2958f595fa7a3be4aeeec66.tar drakx-backup-do-not-use-1a58abd155d2fb3cc2958f595fa7a3be4aeeec66.tar.gz drakx-backup-do-not-use-1a58abd155d2fb3cc2958f595fa7a3be4aeeec66.tar.bz2 drakx-backup-do-not-use-1a58abd155d2fb3cc2958f595fa7a3be4aeeec66.tar.xz drakx-backup-do-not-use-1a58abd155d2fb3cc2958f595fa7a3be4aeeec66.zip |
split harddrake part that configure a module into modules::interactive
Diffstat (limited to 'perl-install/modules/interactive.pm')
-rw-r--r-- | perl-install/modules/interactive.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/perl-install/modules/interactive.pm b/perl-install/modules/interactive.pm new file mode 100644 index 000000000..f0e4ae09a --- /dev/null +++ b/perl-install/modules/interactive.pm @@ -0,0 +1,25 @@ +package modules::interactive; +use interactive; +use common; + +sub config_window { + my ($in, $data) = @_; + require modules; + modules::mergein_conf('/etc/modules.conf'); + my %conf = modules::get_parameters($data->{driver}); + require modparm; + my @l; + foreach (modparm::parameters($data->{driver})) { + my ($name, $format, $description) = @$_; + push @l, { label => $name, help => "$description\n[$format]", val => \$conf{$name} }; + } + if ($in->ask_from("Module configuration", _("You can configure each parameter of the module here."), \@l)) { + my $options = join(' ', map { if_($conf{$_}, "$_=$conf{$_}") } keys %conf); + if ($options) { + modules::set_options($_->{driver}, $options); + modules::write_conf; + } + } +} + +1; |