Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 78967814f5c37ed67f4cf64d70c9f76a03ee89bc Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Wed, 20 Jun 2018 13:57:35 +0800 |
| 4 | Subject: [PATCH] Fix opening /etc/resolv.conf error |
| 5 | |
| 6 | Fix to start avahi-daemon after systemd-resolved.service. This is because |
| 7 | /etc/resolv.conf is a link to /etc/resolv-conf.systemd which in turn is |
| 8 | a symlink to /run/systemd/resolve/resolv.conf. And /run/systemd/resolve/resolv.conf |
| 9 | is created by systemd-resolved.service by default in current OE's systemd |
| 10 | based systems. |
| 11 | |
| 12 | This fixes errro like below. |
| 13 | |
| 14 | Failed to open /etc/resolv.conf: Invalid argument |
| 15 | |
| 16 | In fact, handling of /etc/resolv.conf is quite distro specific. So this patch |
| 17 | is marked as OE specific. |
| 18 | |
| 19 | Upstream-Status: Inappropriate [OE Specific] |
| 20 | |
| 21 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 22 | |
| 23 | When connman installed to image, /etc/resolv.conf is link to |
| 24 | /etc/resolv-conf.connman. So launch avahi-daemon after connman too. |
| 25 | |
| 26 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | --- |
| 28 | avahi-daemon/avahi-daemon.service.in | 1 + |
| 29 | 1 file changed, 1 insertion(+) |
| 30 | |
| 31 | diff --git a/avahi-daemon/avahi-daemon.service.in b/avahi-daemon/avahi-daemon.service.in |
| 32 | index 548c834..63e28e4 100644 |
| 33 | --- a/avahi-daemon/avahi-daemon.service.in |
| 34 | +++ b/avahi-daemon/avahi-daemon.service.in |
| 35 | @@ -18,6 +18,7 @@ |
| 36 | [Unit] |
| 37 | Description=Avahi mDNS/DNS-SD Stack |
| 38 | Requires=avahi-daemon.socket |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 39 | +After=systemd-resolved.service connman.service |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | |
| 41 | [Service] |
| 42 | Type=dbus |
| 43 | -- |
| 44 | 2.11.0 |
| 45 | |