aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-01-31 13:33:03 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-01-31 13:33:03 +0100
commite34ec2fbe2166863dae14187c8dceb5dc366a0be (patch)
treed99e59ae9b1c3a474816ae34fa97521c20a6f590 /bin
parentad6b74f8a6520222a68d5dd75b2de0d8870fbc50 (diff)
downloadpacman-offline-e34ec2fbe2166863dae14187c8dceb5dc366a0be.tar.gz
pacman-offline-e34ec2fbe2166863dae14187c8dceb5dc366a0be.tar.zst
override only if not rebooting directly...
... and also make the timer a separate condition.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pacman-offline14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline
index cbf5ff5..acc8646 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -83,12 +83,6 @@ pacman --config /run/pacman.conf --sync --noconfirm --sysupgrade --downloadonly
# enable system update
ln -sf /var/cache/pacman/pkg /system-update
-# force a soft-reboot on reboot
-if [ -e /usr/lib/systemd/system/systemd-soft-reboot.service ]; then
- ln -sf ../../../usr/lib/systemd/system/systemd-soft-reboot.service /run/systemd/system/systemd-reboot.service
- systemctl daemon-reload
-fi
-
# reboot if requested
if [ ${REBOOT} -eq 1 ]; then
if systemctl --dry-run soft-reboot 2>/dev/null; then
@@ -98,8 +92,14 @@ if [ ${REBOOT} -eq 1 ]; then
echo "Rebooting for update."
systemctl reboot
fi
+# force a soft-reboot on (manual) reboot
+elif [ -e /usr/lib/systemd/system/systemd-soft-reboot.service ]; then
+ ln -sf ../../../usr/lib/systemd/system/systemd-soft-reboot.service /run/systemd/system/systemd-reboot.service
+ systemctl daemon-reload
+fi
+
# start timer if requested
-elif [ ${TIMER} -eq 1 ]; then
+if [ ${TIMER} -eq 1 ]; then
systemctl start pacman-offline-reboot.timer
fi