Add check for version compatibility

This commit is contained in:
Dean Troyer 2011-10-25 15:49:47 -05:00
parent e753fdf42c
commit ecc5a90929

View file

@ -65,6 +65,13 @@ if [ -n "$IMAGEONLY" ]; then
RELEASE="pass"
fi
# Make sure that we have the proper version of ubuntu
UBUNTU_VERSION=`cat /etc/lsb-release | grep CODENAME | sed 's/.*=//g'`
if [ "$UBUNTU_VERSION" = "natty" -a "$RELEASE" = "oneiric" ]; then
echo "natty installs can't build oneiric images"
exit 1
fi
case $FORMAT in
kvm|qcow2) FORMAT=qcow2
QFORMAT=qcow2