aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-07-11 13:08:46 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-07-11 13:08:46 +0200
commita8479069799046c97ef918b27d7428d6754b3fdc (patch)
tree2a123e7a5991c487e9f175c3d2d0637a283ef385 /bin
parent6147875514edec881f07a79fd75e161e8d2efe60 (diff)
downloadpacman-offline-a8479069799046c97ef918b27d7428d6754b3fdc.tar.gz
pacman-offline-a8479069799046c97ef918b27d7428d6754b3fdc.tar.zst
support systemd without soft-reboot
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pacman-offline6
1 files changed, 5 insertions, 1 deletions
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