Add FLOATING_RANGE default

This commit is contained in:
Dean Troyer 2011-10-13 13:20:13 -05:00
parent 8f851e716e
commit 7c076eeff5

View file

@ -120,8 +120,14 @@ RUN_SH=$CHROOTCACHE/natty-stack/$DEST/run.sh
cat > $RUN_SH <<EOF cat > $RUN_SH <<EOF
#!/usr/bin/env bash #!/usr/bin/env bash
# Get IP range
set \`ip addr show dev eth0 | grep inet\`
PREFIX=\`echo \$2 | cut -d. -f1,2,3\`
export FLOATING_RANGE="\$PREFIX.224/27"
# Pre-empt download of natty image # Pre-empt download of natty image
tar czf $DEST/devstack/files/natty.tgz /etc/hosts tar czf $DEST/devstack/files/natty.tgz /etc/hosts
mkdir -p $DEST/devstack/files/images
touch $DEST/devstack/files/images/natty-server-cloudimg-amd64-vmlinuz-virtual touch $DEST/devstack/files/images/natty-server-cloudimg-amd64-vmlinuz-virtual
touch $DEST/devstack/files/images/natty-server-cloudimg-amd64.img touch $DEST/devstack/files/images/natty-server-cloudimg-amd64.img
@ -137,6 +143,7 @@ EOF
# Make the run.sh executable # Make the run.sh executable
chmod 755 $RUN_SH chmod 755 $RUN_SH
chroot $CHROOTCACHE/natty-stack chown stack $DEST/run.sh
# build a new image # build a new image
BASE=$CHROOTCACHE/build.$$ BASE=$CHROOTCACHE/build.$$