From 2b9d1d5a109a4802953d46aaa49269b61753376c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 24 Feb 2017 11:16:26 +0100 Subject: [PATCH] No longer depend on acpid, skip acpi(d) specific stuff under systemd systemd provides all the relevant bits via logind, so let's all our acpi magic when running under systemd. Closes grml/release-planning#4 @ GH --- autoconfig.functions | 35 ++++++++++++++++++++--------------- debian/control | 3 +-- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/autoconfig.functions b/autoconfig.functions index ea17895..802db38 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -697,21 +697,26 @@ fi # {{{ ACPI config_acpi(){ -if checkbootparam 'noacpi'; then - ewarn "ACPI: Not loading modules as requested by boot option \"noacpi\"." ; eend 0 -elif checkbootparam 'nogrmlacpi' ; then - ewarn "ACPI: Not loading modules as requested by boot option \"nogrmlacpi\"." ; eend 0 -elif [ ! -d /proc/acpi ] ; then - ewarn "ACPI: Kernel support not present." ; eend 0 -else - einfo "ACPI: Loading modules (disable with boot option noacpi / nogrmlacpi): " - eindent - found="" - for a in /lib/modules/$KERNEL/kernel/drivers/acpi/*; do - basename="${a##*/}" - basename="${basename%%.*}" - case "$basename" in *_acpi) - egrep -qi "${basename%%_acpi}" /proc/acpi/dsdt 2>>$DEBUG || continue ;; + if $SYSTEMD ; then + echo "systemd detected, no acpi(d) stuff needed." >>"$DEBUG" + return + fi + + if checkbootparam 'noacpi'; then + ewarn "ACPI: Not loading modules as requested by boot option \"noacpi\"." ; eend 0 + elif checkbootparam 'nogrmlacpi' ; then + ewarn "ACPI: Not loading modules as requested by boot option \"nogrmlacpi\"." ; eend 0 + elif [ ! -d /proc/acpi ] ; then + ewarn "ACPI: Kernel support not present." ; eend 0 + else + einfo "ACPI: Loading modules (disable with boot option noacpi / nogrmlacpi): " + eindent + found="" + for a in /lib/modules/$KERNEL/kernel/drivers/acpi/*; do + basename="${a##*/}" + basename="${basename%%.*}" + case "$basename" in *_acpi) + egrep -qi "${basename%%_acpi}" /proc/acpi/dsdt 2>>$DEBUG || continue ;; esac modprobe $basename >>$DEBUG 2>&1 && found="yes" local BASE="$BASE $basename" diff --git a/debian/control b/debian/control index c9d16ac..4279d32 100644 --- a/debian/control +++ b/debian/control @@ -20,8 +20,7 @@ Architecture: all Conflicts: grml-etc (<= 0.4-7), grml-saveconfig Replaces: grml-saveconfig -Depends: acpid, - beep, +Depends: beep, console-terminus, gawk, gpm, -- 2.1.4