[lxc-devel] [lxc/master] lxc-debian: fix regression when creating wheezy containers

terceiro on Github lxc-bot at linuxcontainers.org
Wed Jun 29 18:03:24 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 681 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160629/693872f9/attachment.bin>
-------------- next part --------------
From 847526ccac49344522a4a95b6ac5920031810ed1 Mon Sep 17 00:00:00 2001
From: Antonio Terceiro <terceiro at debian.org>
Date: Wed, 29 Jun 2016 14:58:35 -0300
Subject: [PATCH] lxc-debian: fix regression when creating wheezy containers

The regression was introduced by commit
3c39b0b7a2b445e08d2e2aecb05566075f4f3423 which makes it possible to
create working stretch containeres by forcinig `init` to be in the
included package list.

However, `init` didn't exit before jessie, so now for wheezy we
explicitly include `sysvinit`; sysvinit on wheezy has `Essential yes`,
so it would already be included anyway.
---
 templates/lxc-debian.in | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in
index f8bf128..62a0c85 100644
--- a/templates/lxc-debian.in
+++ b/templates/lxc-debian.in
@@ -296,8 +296,16 @@ cleanup()
 
 download_debian()
 {
+    case "$release" in
+      wheezy)
+        init=sysvinit
+        ;;
+      *)
+        init=init
+        ;;
+    esac
     packages=\
-init,\
+$init,\
 ifupdown,\
 locales,\
 libui-dialog-perl,\


More information about the lxc-devel mailing list