Browse code

Add check for version compatibility

Dean Troyer authored on 2011/10/26 05:49:47
Showing 1 changed files
... ...
@@ -65,6 +65,13 @@ if [ -n "$IMAGEONLY" ]; then
65 65
     RELEASE="pass"
66 66
 fi
67 67
 
68
+# Make sure that we have the proper version of ubuntu
69
+UBUNTU_VERSION=`cat /etc/lsb-release | grep CODENAME | sed 's/.*=//g'`
70
+if [ "$UBUNTU_VERSION" = "natty" -a "$RELEASE" = "oneiric" ]; then
71
+    echo "natty installs can't build oneiric images"
72
+    exit 1
73
+fi
74
+
68 75
 case $FORMAT in
69 76
     kvm|qcow2)  FORMAT=qcow2
70 77
                 QFORMAT=qcow2