]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-opensuse: Check if given argument is a valid release
authorJohannes Kastl <mail@ojkastl.de>
Fri, 14 Nov 2014 20:57:33 +0000 (21:57 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 25 Nov 2014 19:32:14 +0000 (14:32 -0500)
Signed-off-by: Johannes Kastl <git@ojkastl.de>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-opensuse.in

index bc3baa368fdc19d118d43e67284ae8345bc718dd..60b4ddcbce2a5cef68f682c8c1d3b68a30b7156f 100644 (file)
@@ -427,8 +427,29 @@ if [ -z "$path" ]; then
 fi
 
 if [ -z "$DISTRO" ]; then
+    echo ""
     echo "No release selected, using openSUSE 12.3"
     DISTRO=12.3
+else
+    echo ""
+    case "$DISTRO" in
+       12.3)
+           echo "Selected openSUSE 12.3"
+           ;;
+
+       13.1)
+           echo "Selected openSUSE 13.1"
+           ;;
+
+       13.2)
+           echo "Selected openSUSE 13.2"
+           ;;
+
+       *)
+           echo "You have chosen an invalid release, quitting..."
+           exit 1
+           ;;
+    esac
 fi