summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/service_harddrake
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-07-08 17:35:13 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-07-08 17:35:13 +0000
commita59b51a85dcb22722700beee81263b93aff93c75 (patch)
tree642c0d22165706ce642147f872fa9b63d96c564d /perl-install/standalone/service_harddrake
parent6eb79ba692ef9e45fb809afbcf4b6b401582b3df (diff)
downloaddrakx-a59b51a85dcb22722700beee81263b93aff93c75.tar
drakx-a59b51a85dcb22722700beee81263b93aff93c75.tar.gz
drakx-a59b51a85dcb22722700beee81263b93aff93c75.tar.bz2
drakx-a59b51a85dcb22722700beee81263b93aff93c75.tar.xz
drakx-a59b51a85dcb22722700beee81263b93aff93c75.zip
- only work on start
- add "please wait" message - really don't cry when no previous config
Diffstat (limited to 'perl-install/standalone/service_harddrake')
-rwxr-xr-xperl-install/standalone/service_harddrake10
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 87574e35d..56fbfdbb5 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -12,6 +12,12 @@ use lib qw(/usr/lib/libDrakX);
use strict;
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
+
+if ($ARGV[0] !~ /^start$/) {
+ print "service harddrake [start|stop]\n";
+ exit 0;
+}
+
use MDK::Common;
use POSIX;
@@ -35,6 +41,7 @@ my $str = '#!/usr/bin/perl -w
';
my $in = 'interactive'->vnew('su');
+my $w = $in->wait_message(_("Please wait"), _("Hardware probing in progress"));
# first run ? if not read old hw config
my $previous_config = -f $last_boot_config ? do $last_boot_config : {};
@@ -66,8 +73,8 @@ foreach (@harddrake::data::tree) {
} &$detector;
$config{$Ident} = \%ID;
+ next if is_empty_hash_ref $previous_config;
my $oldconfig = $previous_config->{$Ident};
- next if is_empty_hash_ref %$previous_config;
my $msg;
my @was_removed = difference2([ keys %$oldconfig ], [ keys %ID ]);
@@ -80,6 +87,7 @@ foreach (@harddrake::data::tree) {
@added || @was_removed or next;
next unless (-x $configurator);
+ undef $w;
if ($in->ask_okcancel("Hardware changes in $Ident class",
$msg . "\nDo you want to run the appropriate config tool ?", 1)) {