From ecc5a909292db82648d48cc7ae0e873f7f9d66ac Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Tue, 25 Oct 2011 15:49:47 -0500 Subject: [PATCH] Add check for version compatibility --- tools/make_image.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/make_image.sh b/tools/make_image.sh index d81cef5304..e957c75639 100755 --- a/tools/make_image.sh +++ b/tools/make_image.sh @@ -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