summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2019-07-31 19:09:53 +0200
committerLaurent Bonnans <laurent.bonnans@here.com>2019-08-01 14:08:03 +0200
commit9d96af116c0872bf198ea331187371eb2fc89979 (patch)
tree4f235be811787010c82e1444af62ba6162b1c48c /recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean
parent3dad9dfb5c2fed58a9524a383165dda5a140fc7a (diff)
downloadmeta-updater-9d96af116c0872bf198ea331187371eb2fc89979.tar.gz
Add bugfix service for old connman to systemd-networkdconnman-fix-thud
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Diffstat (limited to 'recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean')
-rw-r--r--recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean14
1 files changed, 14 insertions, 0 deletions
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 @@
1#!/bin/sh
2
3set -e
4
5if [ ! -L /etc/resolv.conf ]; then
6 exit 0
7fi
8
9# 'readlink -f' will fail if the symlink doesn't resolve to an existing path
10if readlink /etc/resolv.conf | grep -q connman; then
11 echo "Replacing resolv.conf symlink: $(readlink /etc/resolv.conf) to /etc/resolv-conf.systemd"
12 rm /etc/resolv.conf
13 ln -s /etc/resolv-conf.systemd /etc/resolv.conf
14fi