# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
-#
-# RCSID $Id: start-umls,v 1.5 2005/08/30 22:13:12 as Exp $
-
-DIR=`dirname $0`
-
-source $DIR/function.sh
-[ -f $DIR/../testing.conf ] || die "Configuration file 'testing.conf' not found"
-
-source $DIR/../testing.conf
+. $PWD/scripts/function.sh
if [ "$#" -eq 0 ]
then
pid=`cat ~/.uml/${host}/pid`
up=`ps up $pid | wc -l`
fi
-
+
if [ $up -eq 2 ]
then
cecho " * Great, ${host} is already running!"
BOOTING_HOSTS="$BOOTING_HOSTS ${host}"
let "count_max += 12"
- UMLHOSTFS=$BUILDDIR/root-fs/gentoo-fs-${host}
+ UMLHOSTFS=$BUILDDIR/root-fs/${host}.img
[ -f $UMLHOSTFS ] || die "!! uml root file system '$UMLHOSTFS' not found"
cecho-n " * Starting ${host}.."
- eval screen -dmS ${host} "$UMLKERNEL \
- umid=${host} \
- ubda=$UMLHOSTFS \
- \$SWITCH_${host} \
- mem=${MEM}M con=pty con0=fd:0,fd:1"
- cecho "done"
+ eval setsid $UMLKERNEL umid=${host} ubda=$UMLHOSTFS \$SWITCH_${host} mem=${MEM}M con=null con1=xterm >>$LOGFILE 2>&1 &
+ cgecho "done"
fi
done
exit 1
fi
- pid=`cat ~/.uml/$host/pid`
- up=`ps up $pid | grep agetty | wc -l`
+ up=`uml_mconsole $host proc net/route 2> /dev/null | grep eth0 | wc -l`
while [ $count -lt $count_max ] && [ $up -eq 0 ]
do
cecho-n "."
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"
done
cecho "exit"
exit 1
else
- cecho "up"
+ cgecho "up"
fi
+
done
cecho " * All uml instances are up now"