diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2023-02-01 07:49:18 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2023-02-08 07:52:17 +0000 |
commit | 2878e21ff11b373d39fa98a77f215c61027337ee (patch) | |
tree | 2f84f255f09cb09975866b1c2955dd4fa5cdeef2 | |
parent | 9150a0455e435e11d27b9b3f89a30cb2f04fe59e (diff) | |
download | src-2878e21ff11b373d39fa98a77f215c61027337ee.tar.gz src-2878e21ff11b373d39fa98a77f215c61027337ee.zip |
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
-rw-r--r-- | sbin/devd/Makefile | 5 | ||||
-rw-r--r-- | sbin/devd/devd.conf | 7 | ||||
-rw-r--r-- | sbin/devd/power_profile.conf | 6 |
3 files changed, 11 insertions, 7 deletions
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"; +}; |