diff options
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakconnect | 8 | ||||
-rwxr-xr-x | perl-install/standalone/drakgw | 9 | ||||
-rwxr-xr-x | perl-install/standalone/draksambashare | 18 | ||||
-rwxr-xr-x | perl-install/standalone/drakups | 10 | ||||
-rwxr-xr-x | perl-install/standalone/logdrake | 9 |
5 files changed, 24 insertions, 30 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index bd04c475b..64b300e6b 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -702,7 +702,8 @@ sub del_intf() { } @all_cards = network::ethernet::get_eth_cards($modules_conf); my %ethernet_names = network::ethernet::get_eth_cards_names(@all_cards); - my $wiz = + require wizards; + my $wiz = wizards->new( { defaultimage => "drakconnect.png", name => N("Remove a network interface"), @@ -747,9 +748,8 @@ sub del_intf() { end => 1, }, }, - }; - require wizards; - wizards->new->safe_process($wiz, $in); + }); + $wiz->safe_process($in); $in->exit(0); } diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw index 2eda7db6d..78f0b1c37 100755 --- a/perl-install/standalone/drakgw +++ b/perl-install/standalone/drakgw @@ -68,8 +68,8 @@ my $resolv_conf = network::network::read_resolv_conf_raw(); my $squid_conf = network::squid::read_squid_conf(); my $dhcpd_conf = network::dhcpd::read_dhcpd_conf(); -my $wiz; -$wiz = +require wizards; +my $wiz = wizards->new( { defaultimage => "drakgw.png", name => N("Internet Connection Sharing"), @@ -332,9 +332,8 @@ You may now share Internet connection with other computers on your Local Area Ne end => 1, }, }, -}; -require wizards; -wizards->new->safe_process($wiz, $in); +}); +$wiz->safe_process($in); diff --git a/perl-install/standalone/draksambashare b/perl-install/standalone/draksambashare index 54ce32fc6..3ff11fba1 100755 --- a/perl-install/standalone/draksambashare +++ b/perl-install/standalone/draksambashare @@ -366,10 +366,9 @@ sub printers_section() { } sub add_entry() { - use wizards; + require wizards; my ($wiz_addshare_name, $wiz_addshare_comment, $wiz_addshare_path); - my $w = wizards->new; - my $wiz = { + my $wiz = wizards->new({ name => N("Add a Samba share"), pages => { welcome => { @@ -426,21 +425,20 @@ sub add_entry() { next => 0, }, } - }; - $w->process($wiz, $in); + }); + $wiz->process($in); $::isWizard = 0; gtkset_mousecursor_normal(); } sub add_printers_entry() { - use wizards; - my $w = wizards->new; + require wizards; my %print = ( 1 => N("pdf-gen - a PDF generator"), 2 => N("printers - all printers available"), ); my $wiz_todo; - my $wiz = { + my $wiz = wizards->new({ name => N("Add Special Printer share"), pages => { welcome => { @@ -533,8 +531,8 @@ sub add_printers_entry() { next => 0, }, } - }; - $w->process($wiz, $in); + }); + $wiz->process($in); $::isWizard = 0; # gtkset_mousecursor_normal() } diff --git a/perl-install/standalone/drakups b/perl-install/standalone/drakups index 60d626f40..1030cbc5e 100755 --- a/perl-install/standalone/drakups +++ b/perl-install/standalone/drakups @@ -63,10 +63,7 @@ sub add_device_wizard { my ($in, $config) = @_; my ($ups_models, $model_list) = readDriversList(); - use wizards; my ($ups, $vendor, $model, $extra, $name, $driver, $port, @new_devices, $opts); - my $w = wizards->new; - my $wiz; my %methods = ( # network => N("Connected through the network"), # need SNMP probe # serial => N("Connected through a serial port"), @@ -75,7 +72,8 @@ sub add_device_wizard { manual => N("Manual configuration"), ); my $method = $methods{auto}; - $wiz = { + require wizards; + my $wiz = wizards->new({ #defaultimage => "logdrake.png", # FIXME name => N("Add an UPS device"), pages => { @@ -164,8 +162,8 @@ Please fill in its name, its driver and its port.", $model, $vendor); next => 0 }, }, - }; - $w->process($wiz, $in); + }); + $wiz->process($in); $config->{$name}{driver} = $driver; $config->{$name}{port} = $port; diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index b98c30d8e..0a93d0c78 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -389,15 +389,14 @@ sub alert_config() { my %services_to_check = map { $_ => 1 } split(':', $options{SERVICES}); $::isWizard = 1; - use wizards; - my $w = wizards->new; my $mode; my $cron_file = "/etc/cron.hourly/logdrake_service"; my %modes = ( configure => N("Configure the mail alert system"), disable => N("Stop the mail alert system"), ); - my $wiz = { + require wizards; + my $wiz = wizards->new({ defaultimage => "logdrake.png", name => N("Mail alert"), pages => { @@ -460,8 +459,8 @@ sub alert_config() { no_back => 1, }, }, - }; - $w->process($wiz, $in); + }); + $wiz->process($in); return if $mode eq 'disable'; $options{SERVICES} = join ':', grep { $services_to_check{$_} } sort keys %services_to_check; |