From 7f3a501bb7bd3f656c2e76c16c7833fe6591c189 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 20 Jan 2004 11:55:20 +0000 Subject: (get_subwizard) introduce the infrastructure that enable to load a part of a wizard from another module --- perl-install/network/netconnect.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 9edea2c3c..0be1647eb 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -67,6 +67,17 @@ sub detect_timezone() { \@country; } +# load sub category's wizard pages into main wizard data structure +sub get_subwizard { + my ($wiz, $type) = @_; + my %net_conf_callbacks = (adsl => sub { require network::adsl; &network::adsl::get_wizard }, + cable => sub { require network::ethernet; &network::ethernet::get_wizard }, + isdn => sub { require network::isdn; &network::isdn::get_wizard }, + lan => sub { require network::ethernet; &network::ethernet::get_wizard }, + modem => sub { require network::modem; &network::modem::get_wizard }, + ); + $net_conf_callbacks{$type}->($wiz); +} # configuring all network devices sub main { -- cgit v1.2.1