summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-08-25 10:09:25 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-08-25 10:09:25 +0000
commit7a759bccdc48194e516e6d742cdbaa46f64a0571 (patch)
tree9e22d193227c20e487a3c232b33bb09f67718cbf /perl-install
parent3e9aa61af8b0f320ac6106807cf20d1cfe749f7b (diff)
downloaddrakx-backup-do-not-use-7a759bccdc48194e516e6d742cdbaa46f64a0571.tar
drakx-backup-do-not-use-7a759bccdc48194e516e6d742cdbaa46f64a0571.tar.gz
drakx-backup-do-not-use-7a759bccdc48194e516e6d742cdbaa46f64a0571.tar.bz2
drakx-backup-do-not-use-7a759bccdc48194e516e6d742cdbaa46f64a0571.tar.xz
drakx-backup-do-not-use-7a759bccdc48194e516e6d742cdbaa46f64a0571.zip
support inline configuators
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/service_harddrake7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 0ac8f2807..d8f9c742d 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -136,6 +136,8 @@ foreach my $hw_class (@harddrake::data::tree) {
next;
}
my ($pid, $no, $res);
+ $hw_class->{automatic} ||= ref($configurator) eq 'CODE';
+
if (!$hw_class->{automatic}) {
$SIG{ALRM} = sub { $no = 1; kill 15, $pid };
unless ($pid = fork()) {
@@ -149,7 +151,10 @@ foreach my $hw_class (@harddrake::data::tree) {
} else {
$res = 1;
}
- if (!$no && $res) {
+ if (ref($configurator) eq 'CODE') {
+ eval { $configurator->() };
+ log::explanations(qw(cannot run "$configurator": $@)) if $@;
+ } elsif (!$no && $res) {
foreach my $configurator (@configurator_pool) {
if (fork()) {
wait();