From 6b4c82f4657bdb56e6b7a56651d6d4bb91a35b8f Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 13:29:32 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- .../avahi-daemon-init/avahi-daemon-init-settings.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 meta-iot/recipes-connectivity/avahi/avahi-daemon-init/avahi-daemon-init-settings.sh (limited to 'meta-iot/recipes-connectivity/avahi/avahi-daemon-init/avahi-daemon-init-settings.sh') diff --git a/meta-iot/recipes-connectivity/avahi/avahi-daemon-init/avahi-daemon-init-settings.sh b/meta-iot/recipes-connectivity/avahi/avahi-daemon-init/avahi-daemon-init-settings.sh new file mode 100755 index 0000000..3a12e9c --- /dev/null +++ b/meta-iot/recipes-connectivity/avahi/avahi-daemon-init/avahi-daemon-init-settings.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +KERNEL_VERSION=`uname -r | cut -d . -f 1-2` +MAJOR=`echo $KERNEL_VERSION | cut -d . -f 1` +MINOR=`echo $KERNEL_VERSION | cut -d . -f 2` + +if [ "${MAJOR}.`printf '%02d' $MINOR`" \< "3.09" ]; then + # avahi might not start because SO_REUSEPORT might be missing during + # runtime. The symbol is only available from kernel 3.9 onwards. + AVAHI_CONF=/etc/avahi/avahi-daemon.conf + if [ -f $AVAHI_CONF ]; then + sed -i -e "s|^#disallow-other-stacks=.*|disallow-other-stacks=yes|" $AVAHI_CONF + else + echo "[server]" > $AVAHI_CONF + echo "disallow-other-stacks=yes" >> $AVAHI_CONF + fi +fi + +exit 0 + -- cgit v1.2.3-54-g00ecf