linux-loongson/tools/power/cpupower/cpupower.service.in
Francesco Poli (wintermute) e5174365c1 cpupower: do not install files to /etc/default/
Improve the installation procedure for the systemd service unit
'cpupower.service', to be more distro-agnostic. Do not install the
service unit configuration file to /etc/default/ (a directory that
is used by Debian and Debian-derivatives and only rarely by other
distros).

Also, clarify the role of the configuration file in its own comments.

Link: https://lore.kernel.org/linux-pm/20250509002206.bd2519ba52035d47c3c32aa6@paranoici.org/T/#ma8a3fa80acc4036af6c754e8ecabacc55b288ad1

Link: https://lore.kernel.org/r/20250513163937.61062-5-invernomuto@paranoici.org
Fixes: 9c70b779ad ("cpupower: add a systemd service to run cpupower")
Signed-off-by: Francesco Poli (wintermute) <invernomuto@paranoici.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-05-13 16:06:28 -06:00

17 lines
408 B
SYSTEMD

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2012-2020, Sébastien Luttringer
# Copyright (C) 2024-2025, Francesco Poli <invernomuto@paranoici.org>
[Unit]
Description=Apply cpupower configuration
ConditionVirtualization=!container
[Service]
Type=oneshot
EnvironmentFile=-___CDIR___cpupower-service.conf
ExecStart=___LDIR___/cpupower
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target