summaryrefslogtreecommitdiff
path: root/systemd.install
diff options
context:
space:
mode:
authorThorsten Töpper <atsutane-aur@freethoughts.de>2025-10-03 00:05:56 +0200
committerThorsten Töpper <atsutane@freethoughts.de>2025-10-03 00:05:56 +0200
commitd46cb14d80310c8081ec12e21df9445b5c1bc91d (patch)
tree218124ea2bc4f44e1e902b7d5027817ad5136c16 /systemd.install
parent5d6462c45081611f6c7717b5a360929b23799153 (diff)
downloadsystemd-git-d46cb14d80310c8081ec12e21df9445b5c1bc91d.tar.gz
systemd-git-d46cb14d80310c8081ec12e21df9445b5c1bc91d.tar.bz2
Functionally in sync with core/systemd 258-4.
Diffstat (limited to 'systemd.install')
-rw-r--r--systemd.install30
1 files changed, 23 insertions, 7 deletions
diff --git a/systemd.install b/systemd.install
index 9f01f18..33e9d0e 100644
--- a/systemd.install
+++ b/systemd.install
@@ -4,10 +4,11 @@ sd_booted() {
[[ -d run/systemd/system && ! -L run/systemd/system ]]
}
-add_journal_acls() {
- # ignore errors, since the filesystem might not support ACLs
- setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx var/log/journal/ 2>/dev/null
- :
+services_needing_restart() {
+ systemctl list-units --state=running --plain --quiet 'systemd-*.service' \
+ | cut -d' ' -f1 \
+ | grep -Ev '^systemd-(logind|networkd)\.service$' \
+ | grep -Ev '^systemd-.*@.*\.service$'
}
post_common() {
@@ -24,8 +25,6 @@ post_install() {
post_common "$@"
- add_journal_acls
-
# enable some services by default, but don't track them
systemctl enable \
getty@tty1.service \
@@ -41,8 +40,25 @@ post_upgrade() {
post_common "$@"
if sd_booted; then
+ # reexec systemd system instance
systemctl --system daemon-reexec
- systemctl kill --kill-whom='main' --signal='SIGRTMIN+25' 'user@*.service'
+
+ # reexec systemd user instances
+ systemctl reload 'user@*.service'
+
+ # mark systemd services for later restart
+ for UNIT in $(services_needing_restart); do
+ systemctl set-property --runtime "${UNIT}" Markers=needs-restart
+ done
+ fi
+
+ # show for feature release: 255 -> 256 -> 257 -> ...
+ if [ $(vercmp "${1%%[!0-9]*}" "${2%%[!0-9]*}") -ne 0 ]; then
+ cat <<-EOM
+ :: This is a systemd feature update. You may want to have a look at
+ NEWS for what changed, or if you observe unexpected behavior:
+ /usr/share/doc/systemd/NEWS
+ EOM
fi
local v upgrades=(