use uml_mconsole to check end of booting process

This commit is contained in:
Andreas Steffen
2007-01-11 20:07:05 +00:00
parent 883c1e3084
commit 053ce451b1
3 changed files with 26 additions and 11 deletions
+12 -4
View File
@@ -35,6 +35,12 @@ BOOTING_HOSTS=""
count_max=12 count_max=12
count=0 count=0
#position of konsole window on the desktop
x0=8
y0=8
dx=12
dy=24
for host in $HOSTS for host in $HOSTS
do do
up=0 up=0
@@ -57,13 +63,16 @@ do
[ -f $UMLHOSTFS ] || die "!! uml root file system '$UMLHOSTFS' not found" [ -f $UMLHOSTFS ] || die "!! uml root file system '$UMLHOSTFS' not found"
cecho-n " * Starting ${host}.." cecho-n " * Starting ${host}.."
eval konsole -title ${host} -e "$UMLKERNEL \ eval konsole -title ${host} --geometry "+${x0}+${y0}" -e "$UMLKERNEL \
umid=${host} \ umid=${host} \
ubda=$UMLHOSTFS \ ubda=$UMLHOSTFS \
\$SWITCH_${host} \ \$SWITCH_${host} \
mem=${MEM}M con=pty con0=fd:0,fd:1" & mem=${MEM}M con=pty con0=fd:0,fd:1" &
cecho "done" cecho "done"
fi fi
let "x0+=dx"
let "y0+=dy"
sleep 15
done done
if [ -z "$BOOTING_HOSTS" ] if [ -z "$BOOTING_HOSTS" ]
@@ -90,14 +99,13 @@ do
exit 1 exit 1
fi fi
pid=`cat ~/.uml/$host/pid` up=`uml_mconsole $host proc net/route 2> /dev/null | grep eth0 | wc -l`
up=`ps up $pid | grep agetty | wc -l`
while [ $count -lt $count_max ] && [ $up -eq 0 ] while [ $count -lt $count_max ] && [ $up -eq 0 ]
do do
cecho-n "." cecho-n "."
sleep 5 sleep 5
up=`ps up $pid | grep agetty | wc -l` up=`uml_mconsole $host proc net/route 2> /dev/null | grep eth0 | wc -l`
let "count+=1" let "count+=1"
done done
+2 -3
View File
@@ -90,14 +90,13 @@ do
exit 1 exit 1
fi fi
pid=`cat ~/.uml/$host/pid` up=`uml_mconsole $host proc net/route 2> /dev/null | grep eth0 | wc -l`
up=`ps up $pid | grep agetty | wc -l`
while [ $count -lt $count_max ] && [ $up -eq 0 ] while [ $count -lt $count_max ] && [ $up -eq 0 ]
do do
cecho-n "." cecho-n "."
sleep 5 sleep 5
up=`ps up $pid | grep agetty | wc -l` up=`uml_mconsole $host proc net/route 2> /dev/null | grep eth0 | wc -l`
let "count+=1" let "count+=1"
done done
+12 -4
View File
@@ -35,6 +35,12 @@ BOOTING_HOSTS=""
count_max=12 count_max=12
count=0 count=0
#position of xterm window on the desktop
x0=8
y0=8
dx=12
dy=24
for host in $HOSTS for host in $HOSTS
do do
up=0 up=0
@@ -57,13 +63,16 @@ do
[ -f $UMLHOSTFS ] || die "!! uml root file system '$UMLHOSTFS' not found" [ -f $UMLHOSTFS ] || die "!! uml root file system '$UMLHOSTFS' not found"
cecho-n " * Starting ${host}.." cecho-n " * Starting ${host}.."
eval xterm -title ${host} -rightbar -sb -sl 500 -e "$UMLKERNEL \ eval xterm -title ${host} -geometry "+${x0}+${y0}" -rightbar -sb -sl 500 -e "$UMLKERNEL \
umid=${host} \ umid=${host} \
ubda=$UMLHOSTFS \ ubda=$UMLHOSTFS \
\$SWITCH_${host} \ \$SWITCH_${host} \
mem=${MEM}M con=pty con0=fd:0,fd:1" & mem=${MEM}M con=pty con0=fd:0,fd:1" &
cecho "done" cecho "done"
fi fi
let "x0+=dx"
let "y0+=dy"
sleep 15
done done
if [ -z "$BOOTING_HOSTS" ] if [ -z "$BOOTING_HOSTS" ]
@@ -90,14 +99,13 @@ do
exit 1 exit 1
fi fi
pid=`cat ~/.uml/$host/pid` up=`uml_mconsole $host proc net/route 2> /dev/null | grep eth0 | wc -l`
up=`ps up $pid | grep agetty | wc -l`
while [ $count -lt $count_max ] && [ $up -eq 0 ] while [ $count -lt $count_max ] && [ $up -eq 0 ]
do do
cecho-n "." cecho-n "."
sleep 5 sleep 5
up=`ps up $pid | grep agetty | wc -l` up=`uml_mconsole $host proc net/route 2> /dev/null | grep eth0 | wc -l`
let "count+=1" let "count+=1"
done done