The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1228
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From b6a72639390938286cfdff3bceb5e6cc85daebad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Thu, 13 Oct 2016 14:32:03 -0400 Subject: [PATCH] archlinux: Do DHCP on eth0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- templates/lxc-archlinux.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/templates/lxc-archlinux.in b/templates/lxc-archlinux.in index 8aa1d8d..9d4326e 100644 --- a/templates/lxc-archlinux.in +++ b/templates/lxc-archlinux.in @@ -91,6 +91,15 @@ configure_arch() { [ "${r#nameserver}" = "$r" ] || echo "$r" done < /etc/resolv.conf > "${rootfs_path}/etc/resolv.conf" + # network configuration + cat > "${rootfs_path}/etc/systemd/network/eth0.network" << EOF +[Match] +Name=eth0 + +[Network] +DHCP=ipv4 +EOF + # chroot and configure system arch-chroot "${rootfs_path}" /bin/bash -s << EOF mkdir /run/lock @@ -110,6 +119,9 @@ sed -e 's/^ConditionPathIsReadWrite=\/proc\/sys\/$/ConditionPathIsReadWrite=\/pr # initialize pacman keyring pacman-key --init pacman-key --populate archlinux + +# enable networkd +systemctl enable systemd-networkd EOF # enable getty on active ttys local nttys=$(cat "${config_path}/config" ${shared_config} ${common_config} | grep "^lxc.tty" | head -n1 | cut -d= -f2 | tr -d "[:blank:]")
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel