summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-03-04 18:02:14 +0000
committerOlivier Blin <oblin@mandriva.org>2006-03-04 18:02:14 +0000
commit9a8442eb98d5bb928b2f925e0098bcb08e79981e (patch)
tree2f5a3ef2f0d57a6b79d9150c90b32c46d2397ae3 /perl-install
parent059ebf518764b39267cb8ca3cfadb6f573eddeec (diff)
downloaddrakx-9a8442eb98d5bb928b2f925e0098bcb08e79981e.tar
drakx-9a8442eb98d5bb928b2f925e0098bcb08e79981e.tar.gz
drakx-9a8442eb98d5bb928b2f925e0098bcb08e79981e.tar.bz2
drakx-9a8442eb98d5bb928b2f925e0098bcb08e79981e.tar.xz
drakx-9a8442eb98d5bb928b2f925e0098bcb08e79981e.zip
enable acpi/acpid services when needed, disable them otherwise (#21316)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index e41b51c13..3057b03e0 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -115,9 +115,13 @@ sub install_acpi_pkgs {
my ($do_pkgs, $b) = @_;
my $acpi = bootloader::get_append_with_key($b, 'acpi');
- if (!member($acpi, 'off', 'ht')) {
- $do_pkgs->install('acpi', 'acpid') if !(-x "$::prefix/usr/bin/acpi" && -x "$::prefix/usr/sbin/acpid");
+ my $use_acpi = !member($acpi, 'off', 'ht');
+ if ($use_acpi) {
+ $do_pkgs->ensure_is_installed('acpi', '/usr/bin/acpi');
+ $do_pkgs->ensure_is_installed('acpid', '/usr/sbin/acpid');
}
+ require services;
+ services::set_status($_, $use_acpi, $::isInstall) foreach qw(acpi acpid);
}
sub setupBootloader {