Skip to content
Browse files

Remove APM support

Kernel has removed APM a long time ago.
  • Loading branch information...
1 parent 84fb68b commit c0391de761c7837fdf126ec8afb5b7d184e3ed63 Christian Hofstaedtler committed Nov 16, 2011
Showing with 34 additions and 51 deletions.
  1. +2 −2 autoconfig
  2. +27 −44 autoconfig.functions
  3. +1 −1 debian/control
  4. +1 −1 grml-autoconfig
  5. +3 −3 sbin/grml-autoconfig
View
4 autoconfig
@@ -35,8 +35,8 @@ CONFIG_FSTAB_USER='grml'
# define guid for rebuildfstab used in /etc/fstab (default: users):
CONFIG_FSTAB_GROUP='users'
-# load ACPI/APM modules (default: yes)
-CONFIG_ACPI_APM='yes'
+# load ACPI modules (default: yes)
+CONFIG_ACPI='yes'
# start syslog-ng (default: yes)
CONFIG_SYSLOG='yes'
View
71 autoconfig.functions
@@ -692,54 +692,37 @@ fi
# }}}
# {{{ ACPI
-config_acpi_apm(){
-if [ -d /proc/acpi ]; then
- 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
+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
+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"
+ done
+ if [ -n "$found" ] ; then
+ einfo "$BASE" ; 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"
- done
- if [ -n "$found" ] ; then
- einfo "$BASE" ; eend 0
- else
- ewarn "(none)" ; eend 1
- fi
- if ! ps x 2>>$DEBUG | grep -q /usr/sbin/acpid ; then
- einfo "Starting acpi daemon."
- /etc/init.d/acpid start >>$DEBUG 2>&1 ; eend $?
- else
- ewarn "acpi daemon already running."
- eend 0
- fi
- eoutdent
+ ewarn "(none)" ; eend 1
fi
-else
-# APM
- if checkbootparam 'noapm'; then
- ewarn "Skipping APM Bios detection as requested on boot commandline." ; eend 0
+ if ! ps x 2>>$DEBUG | grep -q /usr/sbin/acpid ; then
+ einfo "Starting acpi daemon."
+ /etc/init.d/acpid start >>$DEBUG 2>&1 ; eend $?
else
- modprobe apm power_off=1 >>$DEBUG 2>&1
- if [ "$?" = "0" ] ; then
- if [ -x /etc/init.d/apmd ] ;then
- einfo "APM Bios found, enabling power management functions."
- /etc/init.d/apmd start ; eend $?
- fi
- else
- eerror "Loading apm module failed." ; eend 1
- fi
+ ewarn "acpi daemon already running."
+ eend 0
fi
+ eoutdent
fi
}
# }}}
View
2 debian/control
@@ -15,7 +15,7 @@ Package: grml-autoconfig
Architecture: all
Conflicts: grml-etc (<= 0.4-7), grml-saveconfig
Replaces: grml-saveconfig
-Depends: ${shlibs:Depends}, ${misc:Depends}, acpid | apmd, udev (>= 0.080-1), zsh, gpm, rsyslog | system-log-daemon, kbd | console-utilities, console-terminus, grml-rebuildfstab (>= 0.3-1), grml-etc-core (>= 0.1-3), grml-scripts (>= 0.8-14), gawk, rungetty, rsync, grml-network (>= 0.3.7)
+Depends: ${shlibs:Depends}, ${misc:Depends}, acpid, udev (>= 0.080-1), zsh, gpm, rsyslog | system-log-daemon, kbd | console-utilities, console-terminus, grml-rebuildfstab (>= 0.3-1), grml-etc-core (>= 0.1-3), grml-scripts (>= 0.8-14), gawk, rungetty, rsync, grml-network (>= 0.3.7)
Recommends: acpi-support, hwinfo, alsa-utils, mdadm, aumix, locales, grml2hd, grml-debootstrap (>= 0.7)
Description: main bootup process of a Grml (based) system
grml-autoconfig is the main part of the bootup process of the
View
2 grml-autoconfig
@@ -142,7 +142,7 @@ checkvalue $CONFIG_MODULES && config_modules
[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|||||">/dev/tty14
-checkvalue $CONFIG_ACPI_APM && config_acpi_apm
+checkvalue $CONFIG_ACPI && config_acpi
[ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "||||||">/dev/tty14
View
6 sbin/grml-autoconfig
@@ -53,7 +53,7 @@ check_current_state()
{
is_set $CONFIG_FSTAB && FSTABSTATUS=ON || FSTABSTATUS=OFF
is_set $CONFIG_CPU && CPUSTATUS=ON || CPUSTATUS=OFF
- is_set $CONFIG_ACPI_APM && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF
+ is_set $CONFIG_ACPI && ACPISTATUS=ON || ACPISTATUS=OFF
is_set $CONFIG_SYSLOG && SYSLOGSTATUS=ON || SYSLOGSTATUS=OFF
is_set $CONFIG_GPM && GPMSTATUS=ON || GPMSTATUS=OFF
}
@@ -77,7 +77,7 @@ settings in /etc/network/interfaces, it just configures grml-autoconfig
" 0 0 0 \
fstab "update /etc/fstab entries (check for devices)" $FSTABSTATUS \
cpufreq "activate cpu frequency scaling" $CPUSTATUS \
-acpi_apm "load ACPI/APM modules" $ACPI_APMSTATUS \
+acpi "load ACPI modules" $ACPISTATUS \
syslog "start syslog-ng" $SYSLOGSTATUS \
gpm "start GPM (mouse on console)" $GPMSTATUS \
2>$TMPFILE
@@ -87,7 +87,7 @@ set_values()
{
check_setting fstab && activate_value CONFIG_FSTAB= || deactivate_value CONFIG_FSTAB=
check_setting cpufreq && activate_value CONFIG_CPU= || deactivate_value CONFIG_CPU=
- check_setting acpi_apm && activate_value CONFIG_ACPI_APM= || deactivate_value CONFIG_ACPI_APM=
+ check_setting acpi && activate_value CONFIG_ACPI= || deactivate_value CONFIG_ACPI=
check_setting syslog && activate_value CONFIG_SYSLOG= || deactivate_value CONFIG_SYSLOG=
check_setting gpm && activate_value CONFIG_GPM= || deactivate_value CONFIG_GPM=
}

0 comments on commit c0391de

Please sign in to comment.
Something went wrong with that request. Please try again.