summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-09-10 12:06:19 +0000
committerJoe MacDonald <joe.macdonald@windriver.com>2012-10-01 13:27:41 -0400
commitb8654266721fa1a06803929e025c2b85b33972ca (patch)
treebcb30f3f8f14d8fa5294a1abbe21c958938c9321 /meta-networking
parent7bfff4b1d6b0067ddabf2474320e3e78795b2b4f (diff)
downloadmeta-openembedded-b8654266721fa1a06803929e025c2b85b33972ca.tar.gz
zeroconf: add from OE-Core
This is about to be removed from OE-Core, so add it here for those that still want it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch19
-rw-r--r--meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf51
-rw-r--r--meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default17
-rw-r--r--meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb34
4 files changed, 121 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch b/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch
new file mode 100644
index 000000000..328e574a9
--- /dev/null
+++ b/meta-networking/recipes-protocols/zeroconf/zeroconf/compilefix.patch
@@ -0,0 +1,19 @@
1| zeroconf.c: In function 'main':
2| zeroconf.c:145: error: 'PATH_MAX' undeclared (first use in this function)
3
4RP - 4/9/09
5
6Upstream-Status: Pending
7
8Index: zeroconf-0.9/zeroconf.c
9===================================================================
10--- zeroconf-0.9.orig/zeroconf.c 2009-09-04 10:05:25.000000000 +0100
11+++ zeroconf-0.9/zeroconf.c 2009-09-04 10:05:42.000000000 +0100
12@@ -33,6 +33,7 @@
13 #include <net/if_arp.h>
14 #include <sys/time.h>
15 #include <signal.h>
16+#include <limits.h>
17
18 #include "delay.h"
19
diff --git a/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf b/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf
new file mode 100644
index 000000000..c3705d278
--- /dev/null
+++ b/meta-networking/recipes-protocols/zeroconf/zeroconf/debian-zeroconf
@@ -0,0 +1,51 @@
1#!/bin/sh
2
3if [ ! -x /usr/sbin/zeroconf ]; then
4 exit 0
5fi
6
7# IPv4 link-local addresses (zeroconf) are
8# only applicable on the 'inet' address family
9[ "X$ADDRFAM" != "Xinet" ] && exit 0
10
11# However there are some methods where it doesn't
12# make any sense to configure an IPv4LL address
13
14# not on loopback
15[ "X$METHOD" = "Xloopback" ] && exit 0
16
17# not on ppp or wvdial either
18[ "X$METHOD" = "Xppp" ] && exit 0
19[ "X$METHOD" = "Xwvdial" ] && exit 0
20
21# The administrator may have blacklisted interfaces
22# or only want zeroconf in a fallback situation
23[ -f /etc/default/zeroconf ] &&
24 . /etc/default/zeroconf
25
26[ -n "$DISABLE" ] && exit 0
27
28for BLACK in $IFBLACKLIST; do
29 case $IFACE in
30 $BLACK)
31 exit 0
32 ;;
33 esac
34done
35
36# should we only allocate an address if we do not already have one?
37if [ -n "$FALLBACK" ]; then
38 /bin/ip addr show $IFACE scope global | grep -q "inet"
39 IP=$?
40 if [ $IP -eq 0 ]; then
41 /bin/ip route add 169.254.0.0/16 dev $IFACE
42 exit 0
43 fi
44fi
45
46# otherwise, run if we aren't already going
47if [ ! -r /var/run/zeroconf.$IFACE.pid ]; then
48 /usr/sbin/zeroconf -i $IFACE
49fi
50
51exit 0
diff --git a/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default b/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default
new file mode 100644
index 000000000..cc07b275f
--- /dev/null
+++ b/meta-networking/recipes-protocols/zeroconf/zeroconf/zeroconf-default
@@ -0,0 +1,17 @@
1# Default for zeroconf
2
3# disable zeroconf
4# If you want to disable zeroconf completely, uncomment the following line
5# this may be useful if you are debugging zeroconf or starting it manually
6#DISABLE=yes
7
8# black-listed interfaces
9# Interfaces which you never wish to have zeroconf run on should
10# be listed here. e.g. "eth2 wlan1" in a space seperated string
11IFBLACKLIST=""
12
13# fallback only
14# If you would only like a link-local address if you were unable to
15# obtain an address via DHCP then uncomment the following line
16#FALLBACK=yes
17
diff --git a/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb b/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb
new file mode 100644
index 000000000..f755940f1
--- /dev/null
+++ b/meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb
@@ -0,0 +1,34 @@
1SUMMARY = "IPv4 link-local address allocator"
2DESCRIPTION = "Zeroconf is a program that is used to claim IPv4 \
3link-local addresses. IPv4 link-local addresses are useful when setting \
4up ad-hoc networking between devices without the involvement of a either \
5a DHCP server or network administrator. \
6These addresses are allocated from the 169.254.0.0/16 address range and \
7are normally attached to each Ethernet device in your computer. \
8Addresses are assigned randomly by each host and, in case of collision, \
9both hosts (are supposed to) renumber."
10AUTHOR = "Anand Kumria <wildfire@progsoc.uts.edu.au>"
11HOMEPAGE = "http://www.progsoc.org/~wildfire/zeroconf/"
12LICENSE = "GPLv2+"
13LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4 \
14 file://zeroconf.c;beginline=1;endline=13;md5=a5bada96e1e34b08eb7446b28e2630b2"
15SECTION = "net"
16
17PR = "r1"
18
19SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${BPN}-${PV}.tar.gz \
20 file://compilefix.patch \
21 file://zeroconf-default \
22 file://debian-zeroconf"
23
24SRC_URI[md5sum] = "bdafb16b008ebb5633e4e581f77821d2"
25SRC_URI[sha256sum] = "a8c74df127753e2310fa1e072f3c9ca44a404bb0bbce9cfec7a84c6dff8bec7b"
26
27do_install () {
28 install -d ${D}${sbindir}
29 install -d ${D}${sysconfdir}/network/if-up.d
30 install -d ${D}${sysconfdir}/default
31 install -c -m 755 ${S}/zeroconf ${D}${sbindir}/zeroconf
32 install -c -m 755 ${WORKDIR}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf
33 install -c ${WORKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf
34}