From 723b7014cbbbe7c536f16e76323f179339ad280c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 14 Oct 2020 13:50:32 +0200 Subject: [safe-mode] Timeouts for our systemd reload/restart shenanigans This might or moght not hang depending on what kind of other services and dependencies are around. Add a safety timeout to those operations. --- core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/modules/safe-mode') diff --git a/core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode b/core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode index b23a76ff..a475fadf 100755 --- a/core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode +++ b/core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode @@ -48,8 +48,9 @@ HandleLidSwitch=ignore IdleAction=ignore EOF # reload - systemctl daemon-reload - systemctl restart systemd-logind + timeout 2 systemctl daemon-reload + timeout 3 systemctl try-restart systemd-logind + systemctl --no-block stop getty@tty1 # Since this is hard-linked } ssh_banner() { -- cgit v1.2.3-55-g7522