Resort to kill -TERM 1 to re-exec the daemon

This might be more reliable when upgrading from an older systemd package. The
systemctl call to reexec will occasionally fail with "Access denied" when we
upgrade from a much older version (like 2-3 versions older). However, sending
PID 1 a SIGTERM is documented to be mostly the same and fixes it 100% of the
times.

Signed-off-by: Anita Zhang <the.anitazha@gmail.com>
Signed-off-by: Filipe Brandenburger <filbranden@gmail.com>
This commit is contained in:
Anita Zhang 2020-01-29 15:20:22 -08:00 committed by Filipe Brandenburger
parent 2ccb3a9dee
commit 58b22cf334

View File

@ -514,7 +514,7 @@ getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-res
%post %post
systemd-machine-id-setup &>/dev/null || : systemd-machine-id-setup &>/dev/null || :
systemctl daemon-reexec &>/dev/null || : systemctl daemon-reexec &>/dev/null || kill -TERM 1 &>/dev/null || :
journalctl --update-catalog &>/dev/null || : journalctl --update-catalog &>/dev/null || :
systemd-tmpfiles --create &>/dev/null || : systemd-tmpfiles --create &>/dev/null || :