From 5a921e858fc78aa84874626adccb543b881f1359 Mon Sep 17 00:00:00 2001 From: spo Date: Tue, 1 Sep 2015 16:20:21 +0300 Subject: [PATCH] Improve vnc script: indicate errors on start vncserver. --- vnc-run | 5 ++++- vnc.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vnc-run b/vnc-run index 9e730ce1a..8684ec10d 100755 --- a/vnc-run +++ b/vnc-run @@ -141,9 +141,12 @@ MCOOKIE=$(mcookie) XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1 add :$SERVERNUM $XAUTHPROTO $MCOOKIE EOF -XAUTHORITY=$AUTHFILE vncserver ":$SERVERNUM" -noxstartup >>"$ERRORFILE" 2>&1 & +XAUTHORITY=$AUTHFILE vncserver ":$SERVERNUM" >>"$ERRORFILE" 2>&1 & VNCPID=$! sleep "$STARTWAIT" +if ! wait ${VNCPID}; then + exit 5 +fi # Start the command and save its exit status. set +e diff --git a/vnc.sh b/vnc.sh index fafc049ef..6d72768f9 100755 --- a/vnc.sh +++ b/vnc.sh @@ -7,4 +7,4 @@ fi echo "DISPLAY is :${DISPLAY_PORT}" export PATH=/dn23/NEWGEOM/NEWGEOM_JENKINS_BUILD_AREA/tools:/opt/TurboVNC/bin:${PATH} -./vnc-run --server-num ${DISPLAY_PORT} vglrun "$@" +./vnc-run --server-num ${DISPLAY_PORT} -e vnc.err vglrun "$@" -- 2.39.2