From 92e3fce63a0c18a7e84fe025f88dc779ddcf2cec Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 18 Aug 2004 08:50:58 +0000 Subject: create install_acpi_pkgs() and use it for auto_installs --- perl-install/any.pm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'perl-install/any.pm') diff --git a/perl-install/any.pm b/perl-install/any.pm index dde3c9789..df244b8ff 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -78,6 +78,15 @@ sub hdInstallPath() { defined $tail && ($head ? "$head/$tail" : "/mnt/hd/$tail"); } +sub install_acpi_pkgs { + my ($do_pkgs, $b) = @_; + + my $acpi = bootloader::get_append($b, 'acpi') or return; + if (!member($acpi, 'off', 'ht')) { + $do_pkgs->install('acpi', 'acpid') if !(-x "$::prefix/usr/bin/acpi" && -x "$::prefix/usr/sbin/acpid") + } +} + sub setupBootloader { my ($in, $b, $all_hds, $fstab, $security) = @_; @@ -98,13 +107,9 @@ sub setupBootloader { eval { run_program::rooted($::prefix, 'lilo', '-u') } if $::isInstall && !$::o->{isUpgrade} && -e "$::prefix/etc/lilo.conf" && glob("$::prefix/boot/boot.*"); - bootloader::install($b, $all_hds); + install_acpi_pkgs($in->do_pkgs, $b); - if (my $acpi = bootloader::get_append($b, 'acpi')) { - if (!member($acpi, 'off', 'ht')) { - $in->do_pkgs->install('acpi', 'acpid') if !(-x "$::prefix/usr/bin/acpi" && -x "$::prefix/usr/sbin/acpid") - } - } + bootloader::install($b, $all_hds); } -- cgit v1.2.1