Masato Taruishi
taru****@sourc*****
2004年 7月 23日 (金) 16:48:34 JST
=================================================================== RCS file: demo/uml/map,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- demo/uml/map 2004/07/22 12:37:01 1.2 +++ demo/uml/map 2004/07/23 07:48:34 1.3 @@ -42,9 +42,12 @@ fi fi -echo "net=192.168.$id.0/24" -echo "host=192.168.$id.1" -echo "uml=192.168.$id.2" +n=`echo \( $id - 1 \) \* 4 | bc` + +echo "net=192.168.1.$n/30" +echo "bcast=192.168.1.`expr $n + 3`" +echo "host=192.168.1.`expr $n + 1`" +echo "uml=192.168.1.`expr $n + 2`" echo "host_if=tap$id" echo "ultrapossum_packages='$pkgs'" echo "local_gateway=$local_gateway" =================================================================== RCS file: demo/uml/rootstrap.conf.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- demo/uml/rootstrap.conf.in 2004/07/22 12:37:01 1.4 +++ demo/uml/rootstrap.conf.in 2004/07/23 07:48:34 1.5 @@ -49,7 +49,7 @@ transport=tuntap host=#UML_HOST# uml=#UML# -netmask=255.255.255.0 +netmask=255.255.255.252 # For a preconfigured tap device (see tunctl(1)) host_if=#UML_HOSTIF# =================================================================== RCS file: demo/uml/ultrapossum,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- demo/uml/ultrapossum 2004/07/22 12:37:01 1.5 +++ demo/uml/ultrapossum 2004/07/23 07:48:34 1.6 @@ -1,4 +1,4 @@ -#!/bin/sh -x +#!/bin/sh export DEBIAN_FRONTEND=noninteractive export UCF_FORCE_CONFFOLD=1 @@ -40,5 +40,6 @@ EOF eval `grep ^SLURPDSLAVE $TARGET/etc/ultrapossum/module.d/server.cf` echo "SLAVES=\"$SLURPDSLAVES\"" >> $TARGET/etc/ultrapossum/ultrapossum.cf + echo "VIRTUALSLAVE=\"$uml\"" >> $TARGET/etc/ultrapossum/ultrapossum.cf fi chroot $TARGET /bin/sh -c "apt-get update && apt-get -y -o DPkg::Options::="--force-confold" -f install $ultrapossum_packages && run-parts --arg=stop /etc/init.d/" =================================================================== RCS file: demo/uml/uml-run,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- demo/uml/uml-run 2004/07/02 10:39:09 1.2 +++ demo/uml/uml-run 2004/07/23 07:48:34 1.3 @@ -14,7 +14,7 @@ trap "if test "x$pid" != "x"; then kill $pid; fi; eval `ultrapossum-config term`; tunctl -d $host_if; iptables -t nat -D POSTROUTING -s $net -d ! $net -j MASQUERADE" 0 tunctl -u $UML_USER -t $host_if -ifconfig $host_if $host up +ifconfig $host_if $host broadcast $bcast netmask 255.255.255.252 up iptables -t nat -A POSTROUTING -s $net -d ! $net -j MASQUERADE "$@"