Merge pull request #1764 from chrisnovakovic/initramfs-enable-dns

initramfs: enable DNS if network is up
This commit is contained in:
MilhouseVH
2017-07-12 04:39:36 +01:00
committed by GitHub
4 changed files with 16 additions and 1 deletions

View File

@@ -1003,6 +1003,10 @@
[ -f "/sysroot/usr/lib/systemd/systemd" ] || error "final_check" "Could not find systemd!"
}
# If the network is up (due to the use of the "ip" kernel parameter) and a DNS
# server is known, allow the libc resolver to use it
grep '^\(nameserver\|domain\) ' /proc/net/pnp | grep -v '^nameserver 0\.0\.0\.0$' > /etc/resolv.conf
if [ "${boot%%=*}" = "FILE" ]; then
error "check arguments" "boot argument can't be FILE type..."
fi