From a8479069799046c97ef918b27d7428d6754b3fdc Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Jul 2023 13:08:46 +0200 Subject: support systemd without soft-reboot --- bin/pacman-offline | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/pacman-offline b/bin/pacman-offline index 57024f0..1a3acf9 100755 --- a/bin/pacman-offline +++ b/bin/pacman-offline @@ -78,7 +78,11 @@ ln -sf /var/cache/pacman/pkg /system-update # reboot if requested if [ ${REBOOT} -eq 1 ]; then - systemctl soft-reboot + if systemctl --dry-run soft-reboot 2>/dev/null; then + systemctl soft-reboot + else + systemctl reboot + fi # start timer if requested elif [ ${TIMER} -eq 1 ]; then systemctl start pacman-offline-reboot.timer -- cgit v1.2.3-70-g09d2