summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-05-09 18:39:01 +0000
committerRichard Purdie <richard@openedhand.com>2006-05-09 18:39:01 +0000
commit8cab54bc51e79fde4395838744233807c6853423 (patch)
tree112322d624abc49f24ce10c9b976f9280dd21953
parentb4cb437c6595ff8ac13506e502fe04b1a60c4e04 (diff)
downloadpoky-8cab54bc51e79fde4395838744233807c6853423.tar.gz
Add zeroconf from OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@387 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--openembedded/packages/zeroconf/files/debian-zeroconf51
-rw-r--r--openembedded/packages/zeroconf/files/zeroconf-default17
-rw-r--r--openembedded/packages/zeroconf/zeroconf_0.9.bb21
3 files changed, 89 insertions, 0 deletions
diff --git a/openembedded/packages/zeroconf/files/debian-zeroconf b/openembedded/packages/zeroconf/files/debian-zeroconf
new file mode 100644
index 0000000000..c3705d2788
--- /dev/null
+++ b/openembedded/packages/zeroconf/files/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/openembedded/packages/zeroconf/files/zeroconf-default b/openembedded/packages/zeroconf/files/zeroconf-default
new file mode 100644
index 0000000000..cc07b275f1
--- /dev/null
+++ b/openembedded/packages/zeroconf/files/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/openembedded/packages/zeroconf/zeroconf_0.9.bb b/openembedded/packages/zeroconf/zeroconf_0.9.bb
new file mode 100644
index 0000000000..c8f7ddfa3a
--- /dev/null
+++ b/openembedded/packages/zeroconf/zeroconf_0.9.bb
@@ -0,0 +1,21 @@
1DESCRIPTION = "IPv4 link-local address allocator"
2AUTHOR = "Anand Kumria <wildfire@progsoc.uts.edu.au>"
3HOMEPAGE = "http://www.progsoc.org/~wildfire/zeroconf/"
4LICENSE = "GPL"
5SECTION = "net"
6PRIORITY = "optional"
7
8PR = "r0"
9
10SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${PN}-${PV}.tar.gz \
11 file://zeroconf-default \
12 file://debian-zeroconf"
13
14do_install () {
15 install -d ${D}${sbindir}
16 install -d ${D}${sysconfdir}/network/if-up.d
17 install -d ${D}${sysconfdir}/default
18 install -c -m 755 ${S}/zeroconf ${D}${sbindir}/zeroconf
19 install -c -m 755 ${WORKDIR}/debian-zeroconf ${D}${sysconfdir}/network/if-up.d/zeroconf
20 install -c ${WORKDIR}/zeroconf-default ${D}${sysconfdir}/default/zeroconf
21}