aboutsummaryrefslogtreecommitdiffstats
path: root/meta-netboot/recipes-core/initramfs-netboot/files
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2016-06-14 17:04:44 +0000
committerGerrit Code Review <gerrit@172.30.200.200>2016-06-19 19:31:25 +0000
commit3da55451c8825c236a37630ec47eefd654e5a771 (patch)
treeb6d4f30cd32c48ef64c1f9dd4bbcd3a9ff88b4b9 /meta-netboot/recipes-core/initramfs-netboot/files
parentd849fedddc762b983741f6583b1f7ba16debbcfd (diff)
meta-netboot: generate appropriate resolv.conf from /proc/net/pnp
Change-Id: I5867a08162b1d9405c769c25d066c2d1e813bca8 Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'meta-netboot/recipes-core/initramfs-netboot/files')
-rw-r--r--meta-netboot/recipes-core/initramfs-netboot/files/init.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta-netboot/recipes-core/initramfs-netboot/files/init.sh b/meta-netboot/recipes-core/initramfs-netboot/files/init.sh
index 81c2c79a4..d31988fd6 100644
--- a/meta-netboot/recipes-core/initramfs-netboot/files/init.sh
+++ b/meta-netboot/recipes-core/initramfs-netboot/files/init.sh
@@ -122,13 +122,16 @@ log_info "Switching to new rootfs"
mkdir -p run/initramfs
pivot_root . run/initramfs || bail_out "pivot_root failed."
-# workaround for connman (avoid bringing down the network interface used for booting)
+# workaround for connman (avoid bringing down the network interface used for booting, disable DNS proxy)
if [[ -f /lib/systemd/system/connman.service ]]; then
log_info "Adjusting Connman configuration"
iface=$(ip -o link show up | tr ':' ' ' | awk '{print $2}' | grep -v -e "^lo$" | head -1)
- sed -i "s|connmand -n\$|connmand -n -I $iface|g" /lib/systemd/system/connman.service
+ sed -i "s|connmand -n\$|connmand -r -n -I $iface|g" /lib/systemd/system/connman.service
fi
+# also use /proc/net/pnp to generate /etc/resolv.conf
+grep -v bootserver /proc/net/pnp | sed 's/^domain/search/g' >/etc/resolv.conf
+
# finally, run systemd
check_debug "Debug point 2. Exit to continue initrd script (run systemd)."