From d0e25e52390905d8f849f79c0ed34862cb936814 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Wed, 5 Feb 2025 17:11:20 -0500 Subject: [PATCH] upgrades: Inhibit shutdown during dist-upgrade Tests: - Start a dist-upgrade from stable to testing. Dist upgrade is completed as expected. "The system will reboot" message appears only after freedombox-dist-upgrade.service has completed. Helps: #2090 Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- plinth/modules/upgrades/privileged.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/upgrades/privileged.py b/plinth/modules/upgrades/privileged.py index 781aae07d..e0e2cd140 100644 --- a/plinth/modules/upgrades/privileged.py +++ b/plinth/modules/upgrades/privileged.py @@ -75,7 +75,8 @@ Description=Upgrade to new stable Debian release [Service] Type=oneshot -ExecStart=/usr/share/plinth/actions/actions upgrades dist_upgrade --no-args +ExecStart=systemd-inhibit /usr/share/plinth/actions/actions \ + upgrades dist_upgrade --no-args KillMode=process TimeoutSec=12hr '''