From 586914e78665319f80e55b7dc3844922b6737f04 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 1 Oct 2004 04:16:43 +0000 Subject: add --wizard option in order to directly run the wizard --- perl-install/standalone/drakups | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install/standalone/drakups') diff --git a/perl-install/standalone/drakups b/perl-install/standalone/drakups index a624f73a6..6ea7264c8 100755 --- a/perl-install/standalone/drakups +++ b/perl-install/standalone/drakups @@ -157,7 +157,8 @@ Please fill in its name, its driver and its port.", $model, $vendor); $config->{$name}{driver} = $driver; $config->{$name}{port} = $port; - $models{ups}->append_set(1 => $name, 2 => $driver, 3 => $port); + # refresh the GUI when needed: + $models{ups}->append_set(1 => $name, 2 => $driver, 3 => $port) if $models{ups}; log::explanations(qq(Configuring "$name" UPS)); } @@ -302,6 +303,12 @@ my @pages = ( $in = 'interactive'->vnew; $ugtk2::wm_icon = "drakups"; + +if (any { $_ eq '--wizard' } @ARGV) { + add_device_wizard($in, $struct); + $in->exit($@ ? 1 : 0); +} + $w = ugtk2->new(N("DrakUPS")); if (!$::isEmbedded) { $::main_window = $w->{rwindow}; -- cgit v1.2.1