From ecf1f1207b4624e3d2b9ed13fd39123799a74fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Sat, 11 Apr 2020 23:05:04 -0400 Subject: [PATCH] tests/no-new-privs: Don't mess with /etc/lxc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- src/tests/lxc-test-no-new-privs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tests/lxc-test-no-new-privs b/src/tests/lxc-test-no-new-privs index 8642992dd3..cfcb43bd6c 100755 --- a/src/tests/lxc-test-no-new-privs +++ b/src/tests/lxc-test-no-new-privs @@ -36,11 +36,13 @@ cleanup() { trap cleanup EXIT SIGHUP SIGINT SIGTERM -mkdir -p /etc/lxc/ -cat > /etc/lxc/default.conf << EOF +if [ ! -d /etc/lxc ]; then + mkdir -p /etc/lxc/ + cat > /etc/lxc/default.conf << EOF lxc.net.0.type = veth lxc.net.0.link = lxcbr0 EOF +fi ARCH=i386 if type dpkg >/dev/null 2>&1; then