]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tests/no-new-privs: Don't mess with /etc/lxc 3374/head
authorStéphane Graber <stgraber@ubuntu.com>
Sun, 12 Apr 2020 03:05:04 +0000 (23:05 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Sun, 12 Apr 2020 03:05:04 +0000 (23:05 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/tests/lxc-test-no-new-privs

index 8642992dd39e6b46c9a35ce3f2da7936f9408975..cfcb43bd6c911f4d8a736664138269b3da3b7f67 100755 (executable)
@@ -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