pull DIST_NAME from source

This commit is contained in:
Jesse Andrews 2011-11-06 07:54:11 -08:00
parent 5f4ae107ef
commit 53d7533d15

View file

@ -1,8 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Ubuntu distro to install
DIST_NAME=${DIST_NAME:-oneiric}
# Make sure that we have the proper version of ubuntu (only works on natty/oneiric) # Make sure that we have the proper version of ubuntu (only works on natty/oneiric)
UBUNTU_VERSION=`cat /etc/lsb-release | grep CODENAME | sed 's/.*=//g'` UBUNTU_VERSION=`cat /etc/lsb-release | grep CODENAME | sed 's/.*=//g'`
if [ ! "oneiric" = "$UBUNTU_VERSION" ]; then if [ ! "oneiric" = "$UBUNTU_VERSION" ]; then
@ -16,6 +13,14 @@ fi
TOOLS_DIR=$(cd $(dirname "$0") && pwd) TOOLS_DIR=$(cd $(dirname "$0") && pwd)
TOP_DIR=`cd $TOOLS_DIR/..; pwd` TOP_DIR=`cd $TOOLS_DIR/..; pwd`
cd $TOP_DIR
# Source params
source ./stackrc
# Ubuntu distro to install
DIST_NAME=${DIST_NAME:-oneiric}
# exit on error to stop unexpected errors # exit on error to stop unexpected errors
set -o errexit set -o errexit
set -o xtrace set -o xtrace
@ -49,10 +54,6 @@ if [ ! -f $tarball ]; then
cp $image_dir/*-vmlinuz-virtual $image_dir/kernel cp $image_dir/*-vmlinuz-virtual $image_dir/kernel
fi fi
cd $TOP_DIR
# Source params
source ./stackrc
# Configure the root password of the vm to be the same as ``ADMIN_PASSWORD`` # Configure the root password of the vm to be the same as ``ADMIN_PASSWORD``
ROOT_PASSWORD=${ADMIN_PASSWORD:-password} ROOT_PASSWORD=${ADMIN_PASSWORD:-password}