summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2020-05-23 20:16:06 +0100
committerAnuj Mittal <anuj.mittal@intel.com>2020-05-29 08:26:48 +0800
commit3d8fdfc57d7fd846c8668daf730cf820ea5ecb13 (patch)
treeb0074f7f1216324cf63e3bb79bb2351f4a9a8c17
parent7bc11ef93b02ff3b223fc0b3b730ce7b06181156 (diff)
downloadopenembedded-core-contrib-3d8fdfc57d7fd846c8668daf730cf820ea5ecb13.tar.gz
openembedded-core-contrib-3d8fdfc57d7fd846c8668daf730cf820ea5ecb13.tar.bz2
openembedded-core-contrib-3d8fdfc57d7fd846c8668daf730cf820ea5ecb13.zip
avahi: Don't advertise example services by default
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 <pbarker@konsulko.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc5
1 files changed, 5 insertions, 0 deletions
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)}"