From 4204309872da5cb401cbb2729d9e2d4869a87f42 Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Thu, 22 Oct 2020 14:58:56 +0900 Subject: agl-basesystem 0.1 --- .../networkd-dhcp-conf/files/clean-connman-symlink.service | 11 +++++++++++ .../networkd-dhcp-conf/files/resolvconf-clean | 14 ++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service create mode 100644 external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean (limited to 'external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files') diff --git a/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service new file mode 100644 index 00000000..8af82637 --- /dev/null +++ b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service @@ -0,0 +1,11 @@ +[Unit] +Description=Clean up bogus symlinked resolv.conf +Before=network-pre.target +Wants=network-pre.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/resolvconf-clean + +[Install] +WantedBy=multi-user.target diff --git a/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean b/external/meta-updater/recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean new file mode 100644 index 00000000..89c7e905 --- /dev/null +++ b/external/meta-updater/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 1.2.3-korg