Commit e224b75f by Stéphane Graber

archlinux: Do DHCP on eth0

parent dff34a76
......@@ -97,6 +97,15 @@ EOF
[ "${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
......@@ -120,6 +129,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
return 0
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment