diff options
author | Christian Rößler | 2017-04-24 17:18:42 +0200 |
---|---|---|
committer | Christian Rößler | 2017-04-24 17:18:42 +0200 |
commit | 40cbdf108ab1d85c69fcfd1d506340b7b102f40c (patch) | |
tree | 855a4357b517de1239b5e8d7a9afe755bbebe1b6 /core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/resolution | |
parent | [pam] add missing content package (diff) | |
download | mltk-40cbdf108ab1d85c69fcfd1d506340b7b102f40c.tar.gz mltk-40cbdf108ab1d85c69fcfd1d506340b7b102f40c.tar.xz mltk-40cbdf108ab1d85c69fcfd1d506340b7b102f40c.zip |
[run-virt] Floppy (fd1)-scripts: Some more testing, some hardening
Diffstat (limited to 'core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/resolution')
-rwxr-xr-x | core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/resolution | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/resolution b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/resolution index a8942b9f..a4811355 100755 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/resolution +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/linux/resolution @@ -42,23 +42,22 @@ fi # Das ist mitunter ein Problem, da die richtige zu finden - Distroabhängig! # Hier ein Beispiel für openSuse 13.2, sollte auch für Debian, Ubuntu, Redhat usw. laufen:. # XAUTHDATEI=$(ps aux | grep -o "root.*X.* \-auth *[^ ]*" | awk '{print $NF}') - -for wartezeit in 0 1 2 3 5 10 10 0 ende; do +for wartezeit in 1 2 3 5 10 10 0 ende; do [ "$wartezeit" = "ende" ] && { logger "openslx resolution utility: XAUTHFILE not found. Exiting." ; exit 1; } XAUTHORITY=$(ps aux | grep -o "root.*X.* \-auth *[^ ]*" | awk '{print $NF}') [ -n "${XAUTHORITY}" ] && break sleep $wartezeit done - logger "openslx resolution utility: XAUTHFILE found." # Zu verbessern: Der Name des Verbundenen ist nicht immer bekannt. Daher nehmen wir das -# erste 'connected' in der Ausgabe xrandrs: -AUSGABE=$(DISPLAY="${DISPLAY}" XAUTHORITY="${XAUTHORITY}" xrandr -q|grep -m 1 " connected "|awk '{print $1}') -if [ -z "$AUSGABE" ]; then - logger "openslx resolution utility: Could not detect output device. Exiting." - exit 1 -fi +# erste 'connected' in der Ausgabe xrandrs Und warten evtl. ein Weilchen):: +for wartezeit in 1 1 1 2 0 ende; do + [ "$wartezeit" = "ende" ] && { logger "openslx resolution utility: Could not detect output device. Exiting." ; exit 1; } + AUSGABE=$(DISPLAY="${DISPLAY}" XAUTHORITY="${XAUTHORITY}" xrandr -q|grep -m 1 " connected "|awk '{print $1}') + [ -n "$AUSGABE" ] && break + sleep $wartezeit +done # Pruefen, ob xrand eine passende modeline ausgibt: if [ "$(DISPLAY=${DISPLAY} XAUTHORITY=${XAUTHORITY} xrandr | grep -c ${RESOLUTION})" -eq 0 ]; then |