From a9cedbdd3c82d37e11d0af40aeed65f106c26f3b Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Wed, 31 Jul 2019 19:09:53 +0200 Subject: Add bugfix service for old connman to systemd-networkd Signed-off-by: Laurent Bonnans --- .../networkd-dhcp-conf/files/resolvconf-clean | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean (limited to 'recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean') diff --git a/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean b/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean new file mode 100644 index 0000000..89c7e90 --- /dev/null +++ b/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ ! -L /etc/resolv.conf ]; then + exit 0 +fi + +# 'readlink -f' will fail if the symlink doesn't resolve to an existing path +if readlink /etc/resolv.conf | grep -q connman; then + echo "Replacing resolv.conf symlink: $(readlink /etc/resolv.conf) to /etc/resolv-conf.systemd" + rm /etc/resolv.conf + ln -s /etc/resolv-conf.systemd /etc/resolv.conf +fi -- cgit v1.2.3-54-g00ecf