ia64/xen-unstable

changeset 219:15edce7a072a

bitkeeper revision 1.76.1.1 (3e54fc23zcQZlR65KsPYjjBI9M-6Hg)

modifications to newdom scripts. Example invocations:

newdom <size> <image> <ip> <root details>

really ./newdom 16000 ../../../xenolinux-2.4.16-kdb/arch/xeno/boot/image 128.232.35.xxx root=/dev/nfs nfsroot=/usr/groups/srgboot/hhh/roots/root1

really ./newdom 16000 ../../../xenolinux-2.4.16-kdb/arch/xeno/boot/image 128.232.35.xxx root=/dev/xhdaNNN

[fill in hhh, xxx and NNN as appropriate]
author iap10@labyrinth.cl.cam.ac.uk
date Thu Feb 20 16:02:43 2003 +0000 (2003-02-20)
parents 48f852d4241d
children 7f19fcd72411
files tools/domain_builder/dom_builder.c tools/domain_builder/newdom tools/domain_builder/vifinit
line diff
     1.1 --- a/tools/domain_builder/dom_builder.c	Thu Feb 20 12:24:36 2003 +0000
     1.2 +++ b/tools/domain_builder/dom_builder.c	Thu Feb 20 16:02:43 2003 +0000
     1.3 @@ -474,7 +474,10 @@ int main(int argc, char **argv)
     1.4      if(launch_domain(meminfo) != 0)
     1.5  	ret = -1;
     1.6  
     1.7 -    free(meminfo);
     1.8 +    
     1.9  out:
    1.10 -    return ret;
    1.11 +    if( ret >= 0 )
    1.12 +       return meminfo->domain;
    1.13 +    else 
    1.14 +       return ret;
    1.15  }
     2.1 --- a/tools/domain_builder/newdom	Thu Feb 20 12:24:36 2003 +0000
     2.2 +++ b/tools/domain_builder/newdom	Thu Feb 20 16:02:43 2003 +0000
     2.3 @@ -1,17 +1,30 @@
     2.4  #!/bin/sh
     2.5  
     2.6 +# newdom <size> <image> <ip> <root details>  
     2.7 +# 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
     2.8 +# newdom 262144 ../../../xenolinux-2.4.16-kdb/arch/xeno/boot/image 128.232.35.240 root=/dev/xhda7 
     2.9 +
    2.10 +
    2.11  VIFINIT=./vifinit
    2.12  DOM_BUILDER=./domain_builder
    2.13  
    2.14 -DOM=$2
    2.15 +SIZE=${1:?"size missing"}
    2.16 +IMAGE=${2:?"image missing"}
    2.17 +IP=${3:?"IP missing"}
    2.18  
    2.19 -ADDR=`/sbin/ifconfig eth0 | grep inet.addr | sed -e 's/.*inet addr:\([0-9.]*\) .*/\1/'`
    2.20 +shift; shift; shift
    2.21 +
    2.22 +echo ARGS $*
    2.23  
    2.24 -LO=`echo $ADDR | sed -e 's/[0-9]\+\.[0-9]\+\.[0-9]\+\.\([0-9]\+\)/\1/'`
    2.25 -HI=`echo $ADDR | sed -e 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/'`
    2.26 +$DOM_BUILDER $SIZE $IMAGE 1 ro ip=$IP:128.232.32.20:128.232.32.1:255.255.240.0::eth0:off $*
    2.27 +DOM=$?
    2.28 +
    2.29 +echo DOM= $DOM
    2.30  
    2.31 -NEWADDR=$HI.$[LO+DOM]
    2.32 +VIF=`cat /proc/xeno/dom$DOM/vif`
    2.33 +
    2.34 +echo VIF= $VIF
    2.35  
    2.36 -$VIFINIT $DOM $NEWADDR
    2.37 +$VIFINIT $VIF $IP
    2.38  
    2.39 -$DOM_BUILDER 16000 $1 1
    2.40 +