[Lxc-users] [PATCH 3/4] Subject: lxc-ubuntu: Default to current ubuntu release.

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jun 24 00:41:26 UTC 2011


If can't match any valid release, use lucid.

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 templates/lxc-ubuntu.in |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/templates/lxc-ubuntu.in b/templates/lxc-ubuntu.in
index 0a55f4c..439e1d0 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -391,6 +391,15 @@ fi
 eval set -- "$options"
 
 release=lucid
+if [ -f /etc/lsb-release ]; then
+    . /etc/lsb-release
+    case "$DISTRIB_CODENAME" in
+        lucid|maverick|natty|oneiric)
+            release=$DISTRIB_CODENAME
+        ;;
+    esac
+fi
+
 bindhome=
 arch=$(arch)
 
-- 
1.7.4.1





More information about the lxc-users mailing list