diff options
author | Simon Rettberg | 2023-08-02 17:07:55 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-08-02 17:07:55 +0200 |
commit | 6b7797aaaf4cdda988a3ffc791ec4d251dd98d98 (patch) | |
tree | 5ba0aeda7c183c790a778a609d5f4dac33e7f57a /core | |
parent | [docker-ce] Start no-trivial-root on demand (diff) | |
download | mltk-6b7797aaaf4cdda988a3ffc791ec4d251dd98d98.tar.gz mltk-6b7797aaaf4cdda988a3ffc791ec4d251dd98d98.tar.xz mltk-6b7797aaaf4cdda988a3ffc791ec4d251dd98d98.zip |
[debug-report-bwlp] Gracefully handle hung Xorg
... instead of hanging too
Diffstat (limited to 'core')
-rwxr-xr-x | core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report b/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report index 87b61041..4f82aa33 100755 --- a/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report +++ b/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report @@ -1,6 +1,9 @@ #!/bin/bash # bash because of {,} expansion +export LANG=C.UTF-8 +export LC_ALL=C.UTF-8 + TOOLS=( "journalctl -a" systemctl @@ -175,7 +178,11 @@ fi if [ -n "$XAUTHORITY" ]; then export DISPLAY export XAUTHORITY - xrandr --verbose > "generated/xrandr-out" 2> "generated/xrandr-err" + if timeout --help 2>&1 | grep -q -F -- '-k'; then + timeout -k 1 2 xrandr --verbose + else + timeout -s 9 3 xrandr --verbose + fi > "generated/xrandr-out" 2> "generated/xrandr-err" echo -n "." fi |