xentaur
changeset 41:8c00f233a1d4
removed full pathes from execs inside xentaur.py
author | igor |
---|---|
date | Wed Oct 24 12:31:52 2007 +0300 (2007-10-24) |
parents | 10444acb35f4 |
children | e006fac33f05 |
files | build-xenomips-image xentaur.py |
line diff
1.1 --- a/build-xenomips-image Fri Oct 12 17:31:34 2007 +0300 1.2 +++ b/build-xenomips-image Wed Oct 24 12:31:52 2007 +0300 1.3 @@ -2,7 +2,7 @@ 1.4 1.5 DYNAMIPS_BUILD=no 1.6 XENOMIPS_FS_BUILD=yes 1.7 -CONFIG_FS_BUILD=no 1.8 +CONFIG_FS_BUILD=yes 1.9 IOS_FS_BUILD=yes 1.10 1.11 XENOMIPS_DIR="files/" 1.12 @@ -25,7 +25,7 @@ 1.13 1.14 DEBIAN_MIRROR=http://debian.osdn.org.ua/debian 1.15 DISTRO=sid 1.16 -PACKAGES="openssh-server libc6-xen libelf1 libpcap0.8 screen nfs-common quagga tcpdump" 1.17 +PACKAGES="openssh-server libc6-xen libelf1 libpcap0.8 screen nfs-common quagga tcpdump telnet ntpdate hping3 openntpd" 1.18 DYNAMIPS_SOURCES=http://www.ipflow.utc.fr/dynamips/dynamips-0.2.7.tar.gz 1.19 DYNAMIPS_BUILD_DIR=dynamips/ 1.20 KERNEL_VERSION=`uname -r` 1.21 @@ -134,7 +134,7 @@ 1.22 if echo $CONFIG_FS_BUILD | grep -qi ^y 1.23 then 1.24 myecho Preparing the Xenomips config filesystem 1.25 - dd if=/dev/zero of=${CONFIG_FS_NAME} bs=1k count=${CONFIG_FS_SIZE} 1.26 + dd if=/dev/zero of=${CONFIG_FS_NAME} bs=1k count=1 seek=${CONFIG_FS_SIZE} 1.27 mkfs.ext3 -F ${CONFIG_FS_NAME} 1.28 1.29 mount -o loop ${CONFIG_FS_NAME} ${WORK_DIR}
2.1 --- a/xentaur.py Fri Oct 12 17:31:34 2007 +0300 2.2 +++ b/xentaur.py Wed Oct 24 12:31:52 2007 +0300 2.3 @@ -8,7 +8,7 @@ 2.4 sys.path.append('/etc/xen') 2.5 sys.path.append(xentaur_path) 2.6 2.7 -network='snrs_ipsec_preshared_1' 2.8 +network='snrs_ipsec_rsa_1' 2.9 domain='qua1' 2.10 from xendomain import * 2.11 2.12 @@ -38,8 +38,9 @@ 2.13 2.14 def create_bridges_script(): 2.15 unbound_bridges=set(bridges)-set(real_bridges) 2.16 - create_unbound_bridges="\n".join(map(lambda x: "sudo /usr/sbin/brctl show | awk '{print $1}' | grep -qx "+x+" || sudo /usr/sbin/brctl addbr "+x, unbound_bridges)) 2.17 - create_unbound_bridges+="\n"+"\n".join(map(lambda x: "sudo /bin/ip link set "+x+" up", unbound_bridges)) 2.18 + create_unbound_bridges="\n".join(map(lambda x: "sudo brctl show | awk '{print $1}' | grep -qx "+x+" || sudo brctl addbr "+x, unbound_bridges)) 2.19 + create_unbound_bridges+="\n"+"\n".join(map(lambda x: "sudo brctl stp "+x+" off", unbound_bridges)) 2.20 + create_unbound_bridges+="\n"+"\n".join(map(lambda x: "sudo ip link set "+x+" up", unbound_bridges)) 2.21 2.22 print """#!/bin/sh 2.23 # create unbound bridges 2.24 @@ -50,12 +51,12 @@ 2.25 def create_domains_script(): 2.26 for domain in domains: 2.27 if not domain in real_nodes: 2.28 - print "sudo /usr/sbin/xm create "+xentaur_path+"/xendomain.py "+" domain="+domain+" network="+network+" && sleep 1 && sudo /usr/sbin/xm sched-credit -d $(sudo /usr/sbin/xm list | grep "+domain+" | awk '{print $2}') -c 10 && sleep 1" 2.29 + print "sudo xm create "+xentaur_path+"/xendomain.py "+" domain="+domain+" network="+network+" && sleep 1 && sudo xm sched-credit -d $(sudo xm list | grep "+domain+" | awk '{print $2}') -c 10 && sleep 1" 2.30 2.31 def destroy_domains_script(): 2.32 for domain in domains: 2.33 if not domain in real_nodes: 2.34 - print "sudo /usr/sbin/xm shutdown "+domain 2.35 + print "sudo xm shutdown "+domain 2.36 2.37 def create_screens_script(): 2.38 N=1