apm(8): Remove support for APM BIOS

Drop support for queries and commands that are not supported by ACPI's
/dev/apm interface.  This includes dropping support for
enabling/disabling APM BIOS used by /etc/rc.d/apm.

Reviewed by:	ziaee, imp
Differential Revision:	https://reviews.freebsd.org/D59941
This commit is contained in:
John Baldwin committed 2026-09-30 12:21:45 -04:00
1 parent 8cf4fe39e8
commit 40ce54ccd9
7 files changed
+26 -394

No files matched your search

-6
View File
@@ -97,12 +97,6 @@ ACPIPACKAGE= acpi
ACPI= power_profile
.endif
.if ${MACHINE} == "i386"
CONFGROUPS.${MK_APM}+= APM
APMPACKAGE= apm
APM= apm
.endif
CONFGROUPS.${MK_AUDIT}+= AUDIT
AUDITPACKAGE= audit
AUDIT= auditd \
-50
View File
@@ -1,50 +0,0 @@
#!/bin/sh
#
#
# PROVIDE: apm
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: nojail
. /etc/rc.subr
name="apm"
desc="Advanced power management"
rcvar="apm_enable"
start_precmd="apm_precmd"
command="/usr/sbin/${name}"
start_cmd="${command} -e enable"
stop_cmd="${command} -e disable"
status_cmd="apm_status"
apm_precmd()
{
case `${SYSCTL_N} hw.machine_arch` in
i386)
return 0
;;
esac
return 1
}
apm_status()
{
case `${command} -s` in
1)
echo "APM is enabled."
return 0
;;
0)
echo "APM is disabled"
;;
esac
return 1
}
load_rc_config $name
# doesn't make sense to run in a svcj: nojail keyword
apm_svcj="NO"
run_rc_command "$1"