From: spo Date: Tue, 1 Sep 2015 13:20:21 +0000 (+0300) Subject: Improve vnc script: indicate errors on start vncserver. X-Git-Tag: V_1.4.0_beta4~168 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a921e858fc78aa84874626adccb543b881f1359;p=modules%2Fshaper.git Improve vnc script: indicate errors on start vncserver. --- 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 "$@"