From e34ec2fbe2166863dae14187c8dceb5dc366a0be Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 31 Jan 2024 13:33:03 +0100 Subject: override only if not rebooting directly... ... and also make the timer a separate condition. --- bin/pacman-offline | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/pacman-offline b/bin/pacman-offline index cbf5ff5..acc8646 100755 --- a/bin/pacman-offline +++ b/bin/pacman-offline @@ -83,12 +83,6 @@ 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 @@ -98,8 +92,14 @@ if [ ${REBOOT} -eq 1 ]; then echo "Rebooting for update." systemctl reboot fi +# force a soft-reboot on (manual) reboot +elif [ -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 + # start timer if requested -elif [ ${TIMER} -eq 1 ]; then +if [ ${TIMER} -eq 1 ]; then systemctl start pacman-offline-reboot.timer fi -- cgit v1.2.3-70-g09d2