diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:29:32 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:29:32 +0200 |
commit | 6b4c82f4657bdb56e6b7a56651d6d4bb91a35b8f (patch) | |
tree | 814ad3da280833de03535ca04cf5068da1d31822 /meta-iot/recipes-connectivity/avahi/avahi-daemon-init/avahi-daemon-init-settings.sh | |
download | meta-eca-daisy-enea.tar.gz |
initial commit for Enea Linux 4.0daisy-enea
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta-iot/recipes-connectivity/avahi/avahi-daemon-init/avahi-daemon-init-settings.sh')
-rwxr-xr-x | meta-iot/recipes-connectivity/avahi/avahi-daemon-init/avahi-daemon-init-settings.sh | 20 |
1 files changed, 20 insertions, 0 deletions
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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | KERNEL_VERSION=`uname -r | cut -d . -f 1-2` | ||
4 | MAJOR=`echo $KERNEL_VERSION | cut -d . -f 1` | ||
5 | MINOR=`echo $KERNEL_VERSION | cut -d . -f 2` | ||
6 | |||
7 | if [ "${MAJOR}.`printf '%02d' $MINOR`" \< "3.09" ]; then | ||
8 | # avahi might not start because SO_REUSEPORT might be missing during | ||
9 | # runtime. The symbol is only available from kernel 3.9 onwards. | ||
10 | AVAHI_CONF=/etc/avahi/avahi-daemon.conf | ||
11 | if [ -f $AVAHI_CONF ]; then | ||
12 | sed -i -e "s|^#disallow-other-stacks=.*|disallow-other-stacks=yes|" $AVAHI_CONF | ||
13 | else | ||
14 | echo "[server]" > $AVAHI_CONF | ||
15 | echo "disallow-other-stacks=yes" >> $AVAHI_CONF | ||
16 | fi | ||
17 | fi | ||
18 | |||
19 | exit 0 | ||
20 | |||