From b1e3a9fc3d3b1b8111cca1a134861a7da8f917d0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 28 May 2024 16:50:37 +0200 Subject: support poweroff after update --- systemd/pacman-offline | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'systemd') diff --git a/systemd/pacman-offline b/systemd/pacman-offline index bacf696..83d2791 100755 --- a/systemd/pacman-offline +++ b/systemd/pacman-offline @@ -32,8 +32,10 @@ pacman --config /run/pacman.conf --sync --noconfirm --sysupgrade # clean up package cache pacman --sync --noconfirm --clean -# (soft-)reboot -if [ -s "/usr/lib/modules/$(uname -r)/pkgbase" ]; then +# poweroff or (soft-)reboot +if [ -e '/run/system-update-poweroff' ]; then + systemctl poweroff +elif [ -s "/usr/lib/modules/$(uname -r)/pkgbase" ]; then systemctl soft-reboot else systemctl reboot -- cgit v1.2.3-70-g09d2