From: Paul Barker <[email protected]>

The example service files are placed into /etc/avahi/services when we
run `make install` for avahi. This results in ssh and sftp-ssh services
being announced by default even if no ssh server is installed in an
image.

These example files should be moved away to another location such as
/usr/share/doc/avahi (taking inspiration from Arch Linux).

Signed-off-by: Paul Barker <[email protected]>
Signed-off-by: Steve Sakoman <[email protected]>
---
 meta/recipes-connectivity/avahi/avahi.inc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-connectivity/avahi/avahi.inc 
b/meta/recipes-connectivity/avahi/avahi.inc
index 94fe6a16b6..6acedb5412 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -77,6 +77,11 @@ do_install() {
        rm -rf ${D}${datadir}/dbus-1/interfaces
        test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty 
${D}${datadir}/dbus-1
        rm -rf ${D}${libdir}/avahi
+
+       # Move example service files out of /etc/avahi/services so we don't
+       # advertise ssh & sftp-ssh by default
+       install -d ${D}${docdir}/avahi
+       mv ${D}${sysconfdir}/avahi/services/* ${D}${docdir}/avahi
 }
 
 PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "libdns_sd", 
"libavahi-compat-libdnssd", "", d)}"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138687): 
https://lists.openembedded.org/g/openembedded-core/message/138687
Mute This Topic: https://lists.openembedded.org/mt/74467822/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to