summaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-05-28 16:50:37 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-05-29 09:23:49 +0200
commitb1e3a9fc3d3b1b8111cca1a134861a7da8f917d0 (patch)
treed3b0ed5ba04f2f79fc3ad7a5f7b689734447a48f /systemd
parent3686c619c00b04e4104565532bbad2e76c8fab2c (diff)
downloadpacman-offline-b1e3a9fc3d3b1b8111cca1a134861a7da8f917d0.tar.gz
pacman-offline-b1e3a9fc3d3b1b8111cca1a134861a7da8f917d0.tar.zst
support poweroff after update
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/pacman-offline6
1 files changed, 4 insertions, 2 deletions
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