aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-07-10 10:45:41 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-07-10 22:03:48 +0200
commit6147875514edec881f07a79fd75e161e8d2efe60 (patch)
treec94cccdf833f031fea176c438f90e5fc772826db
parent84a906395b3672f8ad6ac49d5b3f04f9f90bac66 (diff)
downloadpacman-offline-6147875514edec881f07a79fd75e161e8d2efe60.tar.gz
pacman-offline-6147875514edec881f07a79fd75e161e8d2efe60.tar.zst
do a soft-reboot in second step...
... if the modules for running kernel are still available.
-rwxr-xr-xsystemd/pacman-offline6
1 files changed, 5 insertions, 1 deletions
diff --git a/systemd/pacman-offline b/systemd/pacman-offline
index 39ed094..48692eb 100755
--- a/systemd/pacman-offline
+++ b/systemd/pacman-offline
@@ -25,4 +25,8 @@ pacman --config /run/pacman.conf --sync --noconfirm --sysupgrade
pacman --sync --noconfirm --clean
# reboot
-systemctl reboot
+if [ -s "/usr/lib/modules/$(uname -r)/pkgbase" ]; then
+ systemctl soft-reboot
+else
+ systemctl reboot
+fi