mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
bitkeeper revision 1.78 (3e54fc29z6TRVU_wBOLi2SGK8tZZ8g)
Merge labyrinth.cl.cam.ac.uk:/usr/groups/xeno/BK/xeno into labyrinth.cl.cam.ac.uk:/anfs/scratch/labyrinth/iap10/xeno-clone/xeno.bk
This commit is contained in:
commit
bfaa373f8a
3 files changed
+25
-9
No files matched your search
@@ -474,7 +474,10 @@ int main(int argc, char **argv)
|
||||
if(launch_domain(meminfo) != 0)
|
||||
ret = -1;
|
||||
|
||||
free(meminfo);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
if( ret >= 0 )
|
||||
return meminfo->domain;
|
||||
else
|
||||
return ret;
|
||||
}
|
||||
@@ -1,17 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
# newdom <size> <image> <ip> <root details>
|
||||
# newdom 262144 ../../../xenolinux-2.4.16-kdb/arch/xeno/boot/image 128.232.35.240 root=/dev/nfs nfsroot=/usr/groups/srgboot/xxx/roots/root0
|
||||
# newdom 262144 ../../../xenolinux-2.4.16-kdb/arch/xeno/boot/image 128.232.35.240 root=/dev/xhda7
|
||||
|
||||
|
||||
VIFINIT=./vifinit
|
||||
DOM_BUILDER=./domain_builder
|
||||
|
||||
DOM=$2
|
||||
SIZE=${1:?"size missing"}
|
||||
IMAGE=${2:?"image missing"}
|
||||
IP=${3:?"IP missing"}
|
||||
|
||||
ADDR=`/sbin/ifconfig eth0 | grep inet.addr | sed -e 's/.*inet addr:\([0-9.]*\) .*/\1/'`
|
||||
shift; shift; shift
|
||||
|
||||
LO=`echo $ADDR | sed -e 's/[0-9]\+\.[0-9]\+\.[0-9]\+\.\([0-9]\+\)/\1/'`
|
||||
HI=`echo $ADDR | sed -e 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/'`
|
||||
echo ARGS $*
|
||||
|
||||
NEWADDR=$HI.$[LO+DOM]
|
||||
$DOM_BUILDER $SIZE $IMAGE 1 ro ip=$IP:128.232.32.20:128.232.32.1:255.255.240.0::eth0:off $*
|
||||
DOM=$?
|
||||
|
||||
echo DOM= $DOM
|
||||
|
||||
VIF=`cat /proc/xeno/dom$DOM/vif`
|
||||
|
||||
echo VIF= $VIF
|
||||
|
||||
$VIFINIT $VIF $IP
|
||||
|
||||
$VIFINIT $DOM $NEWADDR
|
||||
|
||||
$DOM_BUILDER 16000 $1 1
|
||||
Regular → Executable
File mode changed.