From 6147875514edec881f07a79fd75e161e8d2efe60 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Jul 2023 10:45:41 +0200 Subject: do a soft-reboot in second step... ... if the modules for running kernel are still available. --- systemd/pacman-offline | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2