diff options
-rw-r--r-- | tools/power/cpupower/Makefile | 2 | ||||
-rw-r--r-- | tools/power/cpupower/README | 19 |
2 files changed, 14 insertions, 7 deletions
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index 4ad931509eaa..7cec2c30f98a 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile @@ -312,7 +312,6 @@ install-tools: $(OUTPUT)cpupower $(INSTALL) -d $(DESTDIR)${libdir}/systemd/system sed 's|___CDIR___|${confdir}|; s|___LDIR___|${libexecdir}|' cpupower.service.in > '$(DESTDIR)${libdir}/systemd/system/cpupower.service' $(SETPERM_DATA) '$(DESTDIR)${libdir}/systemd/system/cpupower.service' - if test -d /run/systemd/system; then systemctl daemon-reload; fi install-man: $(INSTALL_DATA) -D man/cpupower.1 $(DESTDIR)${mandir}/man1/cpupower.1 @@ -360,7 +359,6 @@ uninstall: - for HLANG in $(LANGUAGES); do \ rm -f $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpupower.mo; \ done; - - if test -d /run/systemd/system; then systemctl daemon-reload; fi help: @echo 'Building targets:' diff --git a/tools/power/cpupower/README b/tools/power/cpupower/README index e6ae7c1e0a0d..494104de1540 100644 --- a/tools/power/cpupower/README +++ b/tools/power/cpupower/README @@ -59,7 +59,7 @@ $ sudo make install ----------------------------------------------------------------------- | man pages | /usr/man | ----------------------------------------------------------------------- -| systemd service | /usr/lib | +| systemd service | /usr/lib/systemd/system | ----------------------------------------------------------------------- | systemd support script | /usr/libexec | ----------------------------------------------------------------------- @@ -113,7 +113,7 @@ The files will be installed to the following dirs: ----------------------------------------------------------------------- | man pages | ${DESTDIR}/usr/man | ----------------------------------------------------------------------- -| systemd service | ${DESTDIR}/usr/lib | +| systemd service | ${DESTDIR}/usr/lib/systemd/system | ----------------------------------------------------------------------- | systemd support script | ${DESTDIR}/usr/libexec | ----------------------------------------------------------------------- @@ -185,11 +185,20 @@ systemd service --------------- A systemd service is also provided to run the cpupower utility at boot with -settings read from a configuration file. In order to enable this systemd -service, edit '${DESTDIR}/etc/default/cpupower' (uncommenting at least one of -the options, depending on your preferences) and then issue the following +settings read from a configuration file. + +If you want systemd to find the new service after the installation, the service +unit must have been installed in one of the system unit search path directories +(such as '/usr/lib/systemd/system/', which is the default location) and (unless +you are willing to wait for the next reboot) you need to issue the following command: +$ sudo systemctl daemon-reload + +If you want to enable this systemd service, edit +'${DESTDIR}/etc/default/cpupower' (uncommenting at least one of the options, +depending on your preferences) and then issue the following command: + $ sudo systemctl enable --now cpupower.service |