summaryrefslogtreecommitdiffstats
path: root/core/modules/safe-mode
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-14 13:50:32 +0200
committerSimon Rettberg2020-10-14 13:50:32 +0200
commit723b7014cbbbe7c536f16e76323f179339ad280c (patch)
treedfb880459243289a0a51627379e328f993c2bee2 /core/modules/safe-mode
parent[rfs-stage32/vmware*] Change vmware version naming (diff)
downloadmltk-723b7014cbbbe7c536f16e76323f179339ad280c.tar.gz
mltk-723b7014cbbbe7c536f16e76323f179339ad280c.tar.xz
mltk-723b7014cbbbe7c536f16e76323f179339ad280c.zip
[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.
Diffstat (limited to 'core/modules/safe-mode')
-rwxr-xr-xcore/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode5
1 files changed, 3 insertions, 2 deletions
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() {