systemd/systemd: rework trigger script
- apk-tools passes the directories it triggers on as arguments to the trigger script. Use them to only run the relevant parts of the triggers.
- Remove "|| :" from commands, as we run the script without "set -e", it won't fail if a single command fails. Put explicit "exit 0" at the end to ensure this even if the last command beforehand failed.
- Print messages for each action so we know what is happening.
Example output:
qemu-amd64:~$ sudo apk add at-spi2-core-systemd
The following NEW packages will be installed:
at-spi2-core-systemd
Need to download 1689 B of packages.
After this operation, 200 B of additional disk space will be used.
Do you want to continue [Y/n]?
(1/1) Installing at-spi2-core-systemd (63-r0)
Executing systemd-256.11-r4.trigger
Running systemd daemon-reload...
Running systemd reload user@*.service...
Reloading/restarting marked user services for uid=10000...
As we can see it only runs some of the parts of the trigger script, depending on the dirs that were changed.
Follow-up to !6334 (merged).
Edited by Oliver Smith
Merge request reports
Activity
added systemd label
- Resolved by Oliver Smith
- Resolved by Oliver Smith
- Resolved by Oliver Smith
mentioned in commit ollieparanoid/pmaports@4a9a1a41
added 7 commits
-
680600f6...4e3a7ad0 - 6 commits from branch
postmarketOS:master
- 4a9a1a41 - systemd: rework trigger script
-
680600f6...4e3a7ad0 - 6 commits from branch
mentioned in commit ollieparanoid/pmaports@f5de656a
mentioned in commit ollieparanoid/pmaports@f05eb41b
mentioned in commit ollieparanoid/pmaports@a8018abe
added 10 commits
-
f05eb41b...2d103255 - 9 commits from branch
postmarketOS:master
- a8018abe - systemd: rework trigger script
-
f05eb41b...2d103255 - 9 commits from branch
Please register or sign in to reply