[Lxc-users] lxc-ubuntu: Default to current ubuntu release. If can't match any valid release, use lucid.

Stéphane Graber stgraber at ubuntu.com
Thu Jun 23 16:00:15 UTC 2011


Signed-off-by: Stéphane Graber <stgraber 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 b49542c..4c72aee 100644
--- a/templates/lxc-ubuntu.in
+++ b/templates/lxc-ubuntu.in
@@ -396,6 +396,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=
 
 # Code taken from debootstrap
-- 
1.7.5.4





More information about the lxc-users mailing list