summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/service_harddrake
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-04-23 12:03:43 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-04-23 12:03:43 +0000
commit992528cdd70f08a19d77dcaf15e7bc1bd2097da1 (patch)
tree2cd3c33feccb2ec6b79b312d099f28b5066a276c /perl-install/standalone/service_harddrake
parentc20e156537b8a288842d94f34113e9f1310b888e (diff)
downloaddrakx-992528cdd70f08a19d77dcaf15e7bc1bd2097da1.tar
drakx-992528cdd70f08a19d77dcaf15e7bc1bd2097da1.tar.gz
drakx-992528cdd70f08a19d77dcaf15e7bc1bd2097da1.tar.bz2
drakx-992528cdd70f08a19d77dcaf15e7bc1bd2097da1.tar.xz
drakx-992528cdd70f08a19d77dcaf15e7bc1bd2097da1.zip
- when automatic flag is set for one hardware class, do not ask for
confirmation and just do what is needed - only show "probing in progress" message if we did run an interactive tool
Diffstat (limited to 'perl-install/standalone/service_harddrake')
-rwxr-xr-xperl-install/standalone/service_harddrake34
1 files changed, 20 insertions, 14 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 20e43e995..32704fc24 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -94,27 +94,33 @@ foreach my $hw_class (@harddrake::data::tree) {
}
next unless -x first(split /\s+/, $configurator_pool[0]);
- my ($pid, $no);
- $SIG{ALRM} = sub { $no = 1; kill 15, $pid };
- unless ($pid = fork()) {
- exec("/usr/share/harddrake/confirm", $Ident, $timeout, $msg);
+ my ($pid, $no, $res);
+ if (!$hw_class->{automatic}) {
+ $SIG{ALRM} = sub { $no = 1; kill 15, $pid };
+ unless ($pid = fork()) {
+ exec("/usr/share/harddrake/confirm", $Ident, $timeout, $msg);
+ }
+ alarm($timeout);
+ wait();
+ $res = $?;
+ alarm(0);
+ } else {
+ $res = 1;
}
- alarm($timeout);
- wait();
- my $res = $?;
- alarm(0);
- if ($no) {
- require interactive;
- undef $wait;
- $in ||= interactive->vnew;
- $wait = $in->wait_message(N("Please wait"), N("Hardware probing in progress"));
- } elsif ($res) {
+ if ($res) {
foreach my $configurator (@configurator_pool) {
if (fork()) {
wait();
} else { exec("$configurator 2>/dev/null") or die "$configurator missing\n" }
}
}
+ if (!$hw_class->{automatic}) {
+ require interactive;
+ undef $wait;
+ $in ||= interactive->vnew;
+ $wait = $in->wait_message(N("Please wait"), N("Hardware probing in progress"));
+ }
+
}
# output new hw config