diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-08-02 09:07:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-02 09:07:49 +0200 |
commit | f348e80edd3d5a652bf54e59b59442e912986707 (patch) | |
tree | cf866e74a7fba1730a7257681d32c95c0ed6cb5e /recipes-connectivity/networkd-dhcp-conf/files | |
parent | cf559d5857242b458720efa781a8e9a2127b1e1c (diff) | |
parent | 8b5e97cb8c8a948e754d83c651013467942d5a5f (diff) | |
download | meta-updater-f348e80edd3d5a652bf54e59b59442e912986707.tar.gz |
Merge pull request #574 from advancedtelematic/connman-fix-master
Connman fix master
Diffstat (limited to 'recipes-connectivity/networkd-dhcp-conf/files')
-rw-r--r-- | recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service | 11 | ||||
-rw-r--r-- | recipes-connectivity/networkd-dhcp-conf/files/resolvconf-clean | 14 |
2 files changed, 25 insertions, 0 deletions
diff --git a/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service b/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service new file mode 100644 index 0000000..8af8263 --- /dev/null +++ b/recipes-connectivity/networkd-dhcp-conf/files/clean-connman-symlink.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Clean up bogus symlinked resolv.conf | ||
3 | Before=network-pre.target | ||
4 | Wants=network-pre.target | ||
5 | |||
6 | [Service] | ||
7 | Type=oneshot | ||
8 | ExecStart=/usr/sbin/resolvconf-clean | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
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 | |||
3 | set -e | ||
4 | |||
5 | if [ ! -L /etc/resolv.conf ]; then | ||
6 | exit 0 | ||
7 | fi | ||
8 | |||
9 | # 'readlink -f' will fail if the symlink doesn't resolve to an existing path | ||
10 | if 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 | ||
14 | fi | ||