aboutsummaryrefslogtreecommitdiffstats
path: root/systemd/pacman-offline
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 /systemd/pacman-offline
parent6147875514edec881f07a79fd75e161e8d2efe60 (diff)
downloadpacman-offline-a8479069799046c97ef918b27d7428d6754b3fdc.tar.gz
pacman-offline-a8479069799046c97ef918b27d7428d6754b3fdc.tar.zst
support systemd without soft-reboot
Diffstat (limited to 'systemd/pacman-offline')
-rwxr-xr-xsystemd/pacman-offline2
1 files changed, 1 insertions, 1 deletions
diff --git a/systemd/pacman-offline b/systemd/pacman-offline
index 48692eb..b3db182 100755
--- a/systemd/pacman-offline
+++ b/systemd/pacman-offline
@@ -25,7 +25,7 @@ pacman --config /run/pacman.conf --sync --noconfirm --sysupgrade
pacman --sync --noconfirm --clean
# reboot
-if [ -s "/usr/lib/modules/$(uname -r)/pkgbase" ]; then
+if [ -s "/usr/lib/modules/$(uname -r)/pkgbase" ] && systemctl --dry-run soft-reboot 2>/dev/null; then
systemctl soft-reboot
else
systemctl reboot