summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/avahi
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-06-21 14:00:23 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-27 13:55:21 +0100
commitde8563dcec590fd43bdb9a63e957485886e93118 (patch)
tree8c77d4a18efc07aca6e423e1e1894c29cf5ea1bd /meta/recipes-connectivity/avahi
parent2b152d36581053b2fa9e81b2cd1664b885c951f0 (diff)
downloadpoky-de8563dcec590fd43bdb9a63e957485886e93118.tar.gz
avahi: fix error at boot time for avahi-daemon.service
The following error messages appear now and then at boot time. avahi-daemon/chroot.c: open() failed: No such file or directory Failed to open /etc/resolv.conf: Invalid argument The problem is about /etc/resolv.conf. In Yocto's systemd based systems, it's a symlink to /etc/resolv-conf.systemd which in turn is a symlink to /run/systemd/resolve/resolv.conf. The systemd-resolved service handles creation of /run/systemd/resolve/resolv.conf file. So if avahi-daemon is started before systemd-resolved, the error messages appear. Fix this problem by making avahi-daemon start after systemd-resolved. (From OE-Core rev: 647db1d9eb65b225ffbb6953f796232026bfa935) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/avahi')
-rw-r--r--meta/recipes-connectivity/avahi/avahi_0.7.bb1
-rw-r--r--meta/recipes-connectivity/avahi/files/0001-Fix-opening-etc-resolv.conf-error.patch40
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi_0.7.bb b/meta/recipes-connectivity/avahi/avahi_0.7.bb
index b695be9130..3d5f334a88 100644
--- a/meta/recipes-connectivity/avahi/avahi_0.7.bb
+++ b/meta/recipes-connectivity/avahi/avahi_0.7.bb
@@ -3,6 +3,7 @@ require avahi.inc
3SRC_URI += "file://00avahi-autoipd \ 3SRC_URI += "file://00avahi-autoipd \
4 file://99avahi-autoipd \ 4 file://99avahi-autoipd \
5 file://initscript.patch \ 5 file://initscript.patch \
6 file://0001-Fix-opening-etc-resolv.conf-error.patch \
6 " 7 "
7 8
8inherit update-rc.d systemd useradd 9inherit update-rc.d systemd useradd
diff --git a/meta/recipes-connectivity/avahi/files/0001-Fix-opening-etc-resolv.conf-error.patch b/meta/recipes-connectivity/avahi/files/0001-Fix-opening-etc-resolv.conf-error.patch
new file mode 100644
index 0000000000..11e7e8a9bc
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/0001-Fix-opening-etc-resolv.conf-error.patch
@@ -0,0 +1,40 @@
1From 78967814f5c37ed67f4cf64d70c9f76a03ee89bc Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 20 Jun 2018 13:57:35 +0800
4Subject: [PATCH] Fix opening /etc/resolv.conf error
5
6Fix 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
8a symlink to /run/systemd/resolve/resolv.conf. And /run/systemd/resolve/resolv.conf
9is created by systemd-resolved.service by default in current OE's systemd
10based systems.
11
12This fixes errro like below.
13
14 Failed to open /etc/resolv.conf: Invalid argument
15
16In fact, handling of /etc/resolv.conf is quite distro specific. So this patch
17is marked as OE specific.
18
19Upstream-Status: Inappropriate [OE Specific]
20
21Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
22---
23 avahi-daemon/avahi-daemon.service.in | 1 +
24 1 file changed, 1 insertion(+)
25
26diff --git a/avahi-daemon/avahi-daemon.service.in b/avahi-daemon/avahi-daemon.service.in
27index 548c834..63e28e4 100644
28--- a/avahi-daemon/avahi-daemon.service.in
29+++ b/avahi-daemon/avahi-daemon.service.in
30@@ -18,6 +18,7 @@
31 [Unit]
32 Description=Avahi mDNS/DNS-SD Stack
33 Requires=avahi-daemon.socket
34+After=systemd-resolved.service
35
36 [Service]
37 Type=dbus
38--
392.11.0
40