]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-sabayon: Fix handling of eth0 2172/head
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 16 Feb 2018 21:50:45 +0000 (16:50 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 16 Feb 2018 21:50:45 +0000 (16:50 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-sabayon.in

index 14200e8acda73b02f2c7d26d25c585b449ddf741..51594c1892755f8efc6e8713f116e207def46302 100644 (file)
@@ -264,6 +264,13 @@ systemd_container_tuning () {
     # /usr/lib/systemd/system-generators/gentoo-local-generator: line 4: cd: /etc/local.d: No such file or directory
     mkdir ${rootfs}/etc/local.d/
 
+    mkdir ${rootfs}/etc/systemd/system/NetworkManager.service.d/
+    cat <<EOF > ${rootfs}/etc/systemd/system/NetworkManager.service.d/override.conf
+[Service]
+ExecStartPre=-/bin/ip -4 link set dev eth0 down
+EOF
+    chmod 644 ${rootfs}/etc/systemd/system/NetworkManager.service.d/override.conf
+
     return 0
 }