From 48e16f97653453151494ac8389232e50c6b23101 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 19 Jun 2019 07:14:00 -0400 Subject: write /etc/resolv.conf on rootfs before booting --- initramfs-tools/scripts/samizdat | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'initramfs-tools/scripts') diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat index 0abe902..5acf266 100644 --- a/initramfs-tools/scripts/samizdat +++ b/initramfs-tools/scripts/samizdat @@ -12,20 +12,23 @@ mountroot() if [ "$nbdroot" ]; then configure_networking - export ROOTSERVER - (. common.sh - debug_log samizdat.nbd + (debug_log samizdat.nbd . /scripts/local-top/nbd - bootdone nbd-script) & + bootdone nbd-script) - bootwait nbd-script wait_for_gnupghome_tar fi bootwait samizdat-gpg bootmenu bootwait root-mounted + + if [ "$IPV4DNS0" ]; then + printf '%s\n' "$IPV4DNS0" "$IPV4DNS1" | + grep -v 0.0.0.0 | + sed 's/^/nameserver /' > /root/etc/resolv.conf + fi chvt 1 } -- cgit v1.2.3