summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2006-03-04 18:02:21 +0000
committerOlivier Blin <oblin@mandriva.org>2006-03-04 18:02:21 +0000
commit4842bad25f3ca1014a8e4add312d031a57ae8580 (patch)
tree1984b4d87ca95d9bf08a3484fe93b2f34b353b41
parentc8c2eacd54613888f2106e0512d6b18a3878755b (diff)
downloaddrakx-4842bad25f3ca1014a8e4add312d031a57ae8580.tar
drakx-4842bad25f3ca1014a8e4add312d031a57ae8580.tar.gz
drakx-4842bad25f3ca1014a8e4add312d031a57ae8580.tar.bz2
drakx-4842bad25f3ca1014a8e4add312d031a57ae8580.tar.xz
drakx-4842bad25f3ca1014a8e4add312d031a57ae8580.zip
enable acpi/acpid services when needed, disable them otherwise (#21316)
-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 f08f02f70..f72e0f2e3 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 {