devd: Move power_profile part in devd/power_profile.conf

And make it part of the FreeBSD-acpi package.
This avoid calling service power_profile on an installation without it
installed.

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38324
This commit is contained in:
Emmanuel Vadot 2023-02-01 08:49:18 +01:00
parent 9150a0455e
commit 2878e21ff1
3 changed files with 11 additions and 7 deletions

View File

@ -17,6 +17,11 @@ DHCLIENTDIR= ${DEVDDIR}
DHCLIENT+= dhclient.conf DHCLIENT+= dhclient.conf
DHCLIENTPACKAGE= dhclient DHCLIENTPACKAGE= dhclient
CONFGROUPS+= POWERPROFILE
POWERPROFILEDIR= ${DEVDDIR}
POWERPROFILE+= power_profile.conf
POWERPROFILEPACKAGE= acpi
.if ${MK_BLUETOOTH} != "no" .if ${MK_BLUETOOTH} != "no"
CONFGROUPS+= BLUETOOTH CONFGROUPS+= BLUETOOTH
BLUETOOTHDIR= ${DEVDDIR} BLUETOOTHDIR= ${DEVDDIR}

View File

@ -145,13 +145,6 @@ nomatch 10 {
vendor $vendor bus $bus"; vendor $vendor bus $bus";
}; };
# Switch power profiles when the AC line state changes.
notify 10 {
match "system" "ACPI";
match "subsystem" "ACAD";
action "service power_profile $notify";
};
# Notify all users before beginning emergency shutdown when we get # Notify all users before beginning emergency shutdown when we get
# a _CRT or _HOT thermal event and we're going to power down the system # a _CRT or _HOT thermal event and we're going to power down the system
# very soon. # very soon.

View File

@ -0,0 +1,6 @@
# Switch power profiles when the AC line state changes.
notify 10 {
match "system" "ACPI";
match "subsystem" "ACAD";
action "service power_profile $notify";
};