ia64/xen-unstable

changeset 17150:6b875abd0a9e

stubdom: fix mini-os messages log and SDL termination

We can now let the stubdom-dm script output mini-os messages to
stdout/err so that it gets output to the new
/var/log/xen/qemu-dm-$domname.log

In the SDL case, we must not wait for the VNC server port to appear,
as it won't ever.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 13:10:28 2008 +0000 (2008-02-28)
parents ecf7ded43d5c
children 8612d3d9578a
files stubdom/stubdom-dm
line diff
     1.1 --- a/stubdom/stubdom-dm	Thu Feb 28 13:09:28 2008 +0000
     1.2 +++ b/stubdom/stubdom-dm	Thu Feb 28 13:10:28 2008 +0000
     1.3 @@ -62,32 +62,23 @@ done
     1.4  
     1.5  creation="xm create -c stubdom-$domname target=$domid memory=32"
     1.6  
     1.7 -(while true ; do sleep 60 ; done) | $creation > /var/log/xen/qemu-dm-$domid.log &
     1.8 +(while true ; do sleep 60 ; done) | $creation &
     1.9  #xterm -geometry +0+0 -e /bin/sh -c "$creation ; echo ; echo press ENTER to shut down ; read" &
    1.10  consolepid=$!
    1.11  
    1.12  
    1.13 -# Wait for vnc server to appear
    1.14 -while ! vnc_port=`xenstore-read /local/domain/$domid/console/vnc-port`
    1.15 -do
    1.16 -        # Check that the stubdom job is still alive
    1.17 -        kill -0 $consolepid || term
    1.18 -	sleep 1
    1.19 -done
    1.20 -
    1.21 -################
    1.22 -# DEBUG: tcpdump
    1.23 -#while ! stubdomid=`xm domid stubdom-$domname`
    1.24 -#do
    1.25 -#        sleep 1
    1.26 -#done
    1.27 -#xterm -geometry 160x25+0+$height -e /bin/sh -c "tcpdump -n -i vif$stubdomid.0" &
    1.28 -#xterm -geometry 160x25+0+$((2 * $height)) -e /bin/sh -c "tcpdump -n -i vif$stubdomid.1" &
    1.29 -
    1.30  ###########
    1.31  # vncviewer
    1.32  if [ "$vncviewer" = 1 ]
    1.33  then
    1.34 +    # Wait for vnc server to appear
    1.35 +    while ! vnc_port=`xenstore-read /local/domain/$domid/console/vnc-port`
    1.36 +    do
    1.37 +        # Check that the stubdom job is still alive
    1.38 +        kill -0 $consolepid || term
    1.39 +	sleep 1
    1.40 +    done
    1.41 +
    1.42      vncviewer $ip:$vnc_port &
    1.43      vncpid=$!
    1.44  fi