On Tue, 12 Feb 2019 22:29:00 +0100 Christian Kastner <c...@debian.org> wrote:
> see attached patch.

I was a bit too hasty. Here's a patch that works for both old and new
option names.
>From 20746a2b3a323bac12c8bcfe9b9206f8474b0268 Mon Sep 17 00:00:00 2001
From: Christian Kastner <c...@debian.org>
Date: Tue, 12 Feb 2019 22:18:27 +0100
Subject: [PATCH] lxc/default.conf: lxc.network.type is now lxc.net.0.type

This was introduced to package lxc by commit ba9e2543.
---
 tools/autopkgtest-build-lxc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/autopkgtest-build-lxc b/tools/autopkgtest-build-lxc
index c63c945..8b9d9d1 100755
--- a/tools/autopkgtest-build-lxc
+++ b/tools/autopkgtest-build-lxc
@@ -32,10 +32,12 @@ if [ -z "$1" ] || [ -z "$2" ]; then
 fi
 
 # check that LXC config has networking
-if grep -q 'lxc.network.type *= *empty' /etc/lxc/default.conf; then
+if grep -q 'lxc.net.0.type *= *empty' /etc/lxc/default.conf ||
+   grep -q 'lxc.network.type *= *empty' /etc/lxc/default.conf; then
     cat <<EOF >&2
 ERROR: autopkgtest containers need networking; please set it up and adjust
-lxc.network.type in /etc/lxc/default.conf
+lxc.net.0.type in /etc/lxc/default.conf (or lxc.network.type in earlier
+versions)
 EOF
     exit 1
 fi
-- 
2.20.1

Reply via email to