mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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]
This commit is contained in:
1 parent
10335d97eb
commit
f0568abaa3
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.