aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-05-28 20:03:47 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-05-29 09:23:49 +0200
commit4599463573b9799baa0ab4b4763126163f8cf63a (patch)
tree99623b2806913ecfb8332727a117616c68969be1 /bin
parentb1e3a9fc3d3b1b8111cca1a134861a7da8f917d0 (diff)
downloadpacman-offline-4599463573b9799baa0ab4b4763126163f8cf63a.tar.gz
pacman-offline-4599463573b9799baa0ab4b4763126163f8cf63a.tar.zst
prepare for manual poweroff
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pacman-offline11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline
index edb608f..a6e2a99 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -112,9 +112,18 @@ fi
if [ ${REBOOT} -eq 1 ]; then
echo "Soft-rebooting for update."
systemctl soft-reboot
-# force a soft-reboot on (manual) reboot
else
+ # force a soft-reboot on (manual) reboot ...
ln -sf ../../../usr/lib/systemd/system/systemd-soft-reboot.service /run/systemd/system/systemd-reboot.service
+
+ # ... and also on poweroff, but prepare poweroff
+ cp /usr/lib/systemd/system/systemd-soft-reboot.service /run/systemd/system/systemd-poweroff.service
+ cat >> /run/systemd/system/systemd-poweroff.service <<-EOF
+
+ [Service]
+ ExecStart=/usr/bin/touch /run/system-update-poweroff
+ EOF
+
systemctl daemon-reload
fi