]> git.pld-linux.org Git - packages/kernel-tools.git/commitdiff
provide template unit for cpupower
authorJan Palus <atler@pld-linux.org>
Sat, 5 Mar 2022 00:29:38 +0000 (01:29 +0100)
committerJan Palus <atler@pld-linux.org>
Sat, 5 Mar 2022 00:29:38 +0000 (01:29 +0100)
so it's possible to apply parameters per cluster ie
cpupower@big/cpupower@little

cpupower@.service [new file with mode: 0644]
kernel-tools.spec

diff --git a/cpupower@.service b/cpupower@.service
new file mode 100644 (file)
index 0000000..538e02f
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=Configure CPU power related settings
+After=syslog.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=/etc/sysconfig/cpupower
+ExecStart=/usr/bin/cpupower $CPUPOWER_START_OPTS_%I
+ExecStop=/usr/bin/cpupower $CPUPOWER_STOP_OPTS_%I
+
+[Install]
+WantedBy=multi-user.target
index 500939b9ad1523b6dbb56431f4b4347199b73597..f0e2d5586281f1974d8f89c5bcecc3ec26be85d1 100644 (file)
@@ -32,6 +32,7 @@ Source0:      https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz
 # Source0-md5: e6680ce7c989a3efe58b51e3f3f0bf93
 Source1:       cpupower.service
 Source2:       cpupower.config
+Source3:       cpupower@.service
 %if "%{postver}" != ".0"
 Patch0:                https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz
 # Patch0-md5:  0e03bc49d0db9ae31a5086ec49be3768
@@ -574,6 +575,7 @@ cd linux-%{basever}
 install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{systemdunitdir}}
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower@.service
 
 %ifarch %{ix86} x32
 install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
This page took 0.259012 seconds and 4 git commands to generate.