From 4599463573b9799baa0ab4b4763126163f8cf63a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 28 May 2024 20:03:47 +0200 Subject: prepare for manual poweroff --- bin/pacman-offline | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.3-70-g09d2