From 2878e21ff11b373d39fa98a77f215c61027337ee Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Wed, 1 Feb 2023 08:49:18 +0100 Subject: [PATCH] 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 --- sbin/devd/Makefile | 5 +++++ sbin/devd/devd.conf | 7 ------- sbin/devd/power_profile.conf | 6 ++++++ 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 sbin/devd/power_profile.conf diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile index 5b2feb6c2bdb..72c65caa3317 100644 --- a/sbin/devd/Makefile +++ b/sbin/devd/Makefile @@ -17,6 +17,11 @@ DHCLIENTDIR= ${DEVDDIR} DHCLIENT+= dhclient.conf DHCLIENTPACKAGE= dhclient +CONFGROUPS+= POWERPROFILE +POWERPROFILEDIR= ${DEVDDIR} +POWERPROFILE+= power_profile.conf +POWERPROFILEPACKAGE= acpi + .if ${MK_BLUETOOTH} != "no" CONFGROUPS+= BLUETOOTH BLUETOOTHDIR= ${DEVDDIR} diff --git a/sbin/devd/devd.conf b/sbin/devd/devd.conf index 43596fb9a9d5..d30f97c7abb0 100644 --- a/sbin/devd/devd.conf +++ b/sbin/devd/devd.conf @@ -145,13 +145,6 @@ nomatch 10 { 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 # a _CRT or _HOT thermal event and we're going to power down the system # very soon. diff --git a/sbin/devd/power_profile.conf b/sbin/devd/power_profile.conf new file mode 100644 index 000000000000..294856071f00 --- /dev/null +++ b/sbin/devd/power_profile.conf @@ -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"; +};