Let systemd create /var/lib/upower

This directory may not exist when cleaning out /var (e. g. on stateless
systems). As upowerd cannot mkdir it by itself due to `ProtectSystem`,
let systemd create it via `StateDirectory`.

Keep `ReadWritePaths` and the `mkdir` in the Makefile to continue to
support a non-default `--historydir`.
This commit is contained in:
Martin Pitt 2019-02-24 08:56:10 +01:00
parent 18457c99b6
commit e06bfc6a12

View file

@ -14,6 +14,7 @@ ProtectSystem=strict
ProtectKernelTunables=false
ProtectControlGroups=true
ReadWritePaths=@historydir@
StateDirectory=upower
ProtectHome=true
PrivateTmp=true