No longer depend on acpid, skip acpi(d) specific stuff under systemd
authorMichael Prokop <mika@grml.org>
Fri, 24 Feb 2017 10:16:26 +0000 (11:16 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 24 Feb 2017 10:22:42 +0000 (11:22 +0100)
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
debian/control

index ea17895..802db38 100755 (executable)
@@ -697,21 +697,26 @@ fi
 
 # {{{ ACPI
 config_acpi(){
 
 # {{{ 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"
     esac
     modprobe $basename >>$DEBUG 2>&1 && found="yes"
     local BASE="$BASE $basename"
index c9d16ac..4279d32 100644 (file)
@@ -20,8 +20,7 @@ Architecture: all
 Conflicts: grml-etc (<= 0.4-7),
            grml-saveconfig
 Replaces: grml-saveconfig
 Conflicts: grml-etc (<= 0.4-7),
            grml-saveconfig
 Replaces: grml-saveconfig
-Depends: acpid,
-         beep,
+Depends: beep,
          console-terminus,
          gawk,
          gpm,
          console-terminus,
          gawk,
          gpm,