diff options
-rwxr-xr-x | bin/pacman-offline | 6 | ||||
-rw-r--r-- | hook/99-pacman-offline.hook | 2 | ||||
-rwxr-xr-x | systemd/pacman-offline | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline index 80f0759..cbf5ff5 100755 --- a/bin/pacman-offline +++ b/bin/pacman-offline @@ -83,6 +83,12 @@ pacman --config /run/pacman.conf --sync --noconfirm --sysupgrade --downloadonly # enable system update ln -sf /var/cache/pacman/pkg /system-update +# force a soft-reboot on reboot +if [ -e /usr/lib/systemd/system/systemd-soft-reboot.service ]; then + ln -sf ../../../usr/lib/systemd/system/systemd-soft-reboot.service /run/systemd/system/systemd-reboot.service + systemctl daemon-reload +fi + # reboot if requested if [ ${REBOOT} -eq 1 ]; then if systemctl --dry-run soft-reboot 2>/dev/null; then diff --git a/hook/99-pacman-offline.hook b/hook/99-pacman-offline.hook index 242ca78..1228d5a 100644 --- a/hook/99-pacman-offline.hook +++ b/hook/99-pacman-offline.hook @@ -8,4 +8,4 @@ Target = * [Action] Description = Disabling scheduled pacman offline update... When = PostTransaction -Exec = /usr/bin/rm -fv /system-update +Exec = /usr/bin/rm -fv /system-update /run/systemd/system/systemd-reboot.service diff --git a/systemd/pacman-offline b/systemd/pacman-offline index d26038a..9471bfc 100755 --- a/systemd/pacman-offline +++ b/systemd/pacman-offline @@ -19,8 +19,9 @@ function finish { rm -f /run/pacman.conf; } trap finish EXIT sed '/^Include *= *\/etc\/pacman\.d\/offline\.conf$/s|^|#|' < /etc/pacman.conf > /run/pacman.conf -# remove triggering symlink +# remove triggering symlink and (soft-)reboot override rm -f /system-update +rm -f /run/systemd/system/systemd-reboot.service # install updates if [ "$(pacman --sync --print --needed archlinux-keyring | wc -l)" -gt 0 ]; then |