This uses some lightweight tools with systemd-inhibit to block sleep and shutdown when apk is running. This is being installed in a new subpkg that is pulled in only when apk-tools is installed, so that this is not installed on duranium. Signed-off-by: Clayton Craft <craftyguy@postmarketos.org> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8672>
11 lines
224 B
SYSTEMD
11 lines
224 B
SYSTEMD
[Unit]
|
|
Description=Watch for apk lock file
|
|
|
|
[Path]
|
|
# This won't fail if the file doesn't exist, instead it'll wait until it does
|
|
PathExists=/usr/lib/apk/db/lock
|
|
Unit=apk-inhibit.service
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|