diff options
author | Simon Rettberg | 2020-10-14 13:50:32 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-10-14 13:50:32 +0200 |
commit | 723b7014cbbbe7c536f16e76323f179339ad280c (patch) | |
tree | dfb880459243289a0a51627379e328f993c2bee2 /core/modules/safe-mode | |
parent | [rfs-stage32/vmware*] Change vmware version naming (diff) | |
download | mltk-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-x | core/modules/safe-mode/data/opt/openslx/scripts/systemd-safe_mode | 5 |
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() { |