Skip to content

Commit

Permalink
systemd: replace tlp-sleep.service with /lib/systemd/system-sleep/tlp
Browse files Browse the repository at this point in the history
Development version 1.3.0-alpha.1
  • Loading branch information
linrunner committed Oct 3, 2019
1 parent eca6563 commit 821f268
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 25 deletions.
9 changes: 6 additions & 3 deletions Makefile
Expand Up @@ -9,6 +9,7 @@ TLP_ULIB ?= /lib/udev
TLP_NMDSP ?= /etc/NetworkManager/dispatcher.d
TLP_CONF ?= /etc/default/tlp
TLP_SYSD ?= /lib/systemd/system
TLP_SDSL ?= /lib/systemd/system-sleep
TLP_SYSV ?= /etc/init.d
TLP_ELOD ?= /lib/elogind/system-sleep
TLP_SHCPL ?= /usr/share/bash-completion/completions
Expand All @@ -26,6 +27,7 @@ _ULIB = $(DESTDIR)$(TLP_ULIB)
_NMDSP = $(DESTDIR)$(TLP_NMDSP)
_CONF = $(DESTDIR)$(TLP_CONF)
_SYSD = $(DESTDIR)$(TLP_SYSD)
_SDSL = $(DESTDIR)$(TLP_SDSL)
_SYSV = $(DESTDIR)$(TLP_SYSV)
_ELOD = $(DESTDIR)$(TLP_ELOD)
_SHCPL = $(DESTDIR)$(TLP_SHCPL)
Expand Down Expand Up @@ -54,7 +56,6 @@ INFILES = \
tlp.rules \
tlp-run-on \
tlp.service \
tlp-sleep.service \
tlp-stat \
tlp.upstart \
tlp-usb-udev
Expand Down Expand Up @@ -86,6 +87,8 @@ SHFILES = \
tlp-rdw-udev.in \
tlp-rf.in \
tlp-run-on.in \
tlp-sleep \
tlp-sleep.elogind \
tlp-stat.in \
tlp-usb-udev.in

Expand Down Expand Up @@ -122,7 +125,7 @@ ifneq ($(TLP_NO_INIT),1)
endif
ifneq ($(TLP_WITH_SYSTEMD),0)
install -D -m 644 tlp.service $(_SYSD)/tlp.service
install -m 644 tlp-sleep.service $(_SYSD)/
install -D -m 755 tlp-sleep $(_SDSL)/tlp
endif
ifneq ($(TLP_WITH_ELOGIND),0)
install -D -m 755 tlp-sleep.elogind $(_ELOD)/49-tlp-sleep
Expand Down Expand Up @@ -179,7 +182,7 @@ uninstall-tlp:
rm $(_ULIB)/rules.d/85-tlp.rules
rm -f $(_SYSV)/tlp
rm -f $(_SYSD)/tlp.service
rm -f $(_SYSD)/tlp-sleep.service
rm -f $(_SDSL)/tlp-sleep
rm -f $(_ELOD)/49-tlp-sleep
rm -f $(_SHCPL)/tlp-stat
rm -f $(_SHCPL)/bluetooth
Expand Down
3 changes: 2 additions & 1 deletion changelog
@@ -1,4 +1,4 @@
+++ 1.3.0–alpha.0 --- 02.10.2019 +++
+++ 1.3.0–alpha.1 --- 03.10.2019 +++

* Development version

Expand All @@ -8,6 +8,7 @@
clearer error messages
General:
- systemd: start tlp.service earlier in boot process
- systemd: replace tlp-sleep.service with /lib/systemd/system-sleep/tlp
PCI(e) devices:
- Add ASPM method 'powersupersave' (Issue #425)
Processor:
Expand Down
2 changes: 1 addition & 1 deletion tlp-func-base.in
Expand Up @@ -9,7 +9,7 @@
# ----------------------------------------------------------------------------
# Constants

readonly TLPVER="1.3.0-alpha.0"
readonly TLPVER="1.3.0-alpha.1"

readonly CONFFILE=@TLP_CONF@
readonly RUNDIR=@TLP_RUN@
Expand Down
11 changes: 11 additions & 0 deletions tlp-sleep
@@ -0,0 +1,11 @@
#!/bin/sh

# tlp - systemd suspend/resume hook
#
# Copyright (c) 2019 Thomas Koch <linrunner at gmx.net> and others.
# This software is licensed under the GPL v2 or later.

case $1 in
pre) tlp suspend ;;
post) tlp resume ;;
esac
19 changes: 0 additions & 19 deletions tlp-sleep.service.in

This file was deleted.

2 changes: 1 addition & 1 deletion tlp-stat.in
Expand Up @@ -38,7 +38,7 @@ readonly IBMTHERMAL=/proc/acpi/ibm/thermal

readonly DEBUGLOG=/var/log/debug

readonly SYSTEMD_SERVICES="tlp.service tlp-sleep.service"
readonly SYSTEMD_SERVICES="tlp.service"
readonly RFKILL_SERVICES="systemd-rfkill.service systemd-rfkill.socket"

# --- Variables
Expand Down

0 comments on commit 821f268

Please sign in to comment.