summaryrefslogtreecommitdiffstats
path: root/meta/packages/avahi
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/avahi')
-rw-r--r--meta/packages/avahi/avahi.inc27
-rw-r--r--meta/packages/avahi/avahi_0.6.23.bb2
-rw-r--r--meta/packages/avahi/files/00avahi-autoipd10
-rw-r--r--meta/packages/avahi/files/99avahi-autoipd10
4 files changed, 46 insertions, 3 deletions
diff --git a/meta/packages/avahi/avahi.inc b/meta/packages/avahi/avahi.inc
index 67029b30b0..419b787b5f 100644
--- a/meta/packages/avahi/avahi.inc
+++ b/meta/packages/avahi/avahi.inc
@@ -9,6 +9,8 @@ RRECOMMENDS = "libnss-mdns"
9RRECOMMENDS_avahi-daemon = "libnss-mdns" 9RRECOMMENDS_avahi-daemon = "libnss-mdns"
10 10
11SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ 11SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
12 file://00avahi-autoipd \
13 file://99avahi-autoipd \
12 file://initscript.patch;patch=1" 14 file://initscript.patch;patch=1"
13 15
14inherit autotools pkgconfig update-rc.d 16inherit autotools pkgconfig update-rc.d
@@ -64,8 +66,8 @@ pkg_postinst_avahi-daemon () {
64 if [ "x$D" != "x" ]; then 66 if [ "x$D" != "x" ]; then
65 exit 1 67 exit 1
66 fi 68 fi
67 grep avahi /etc/group || addgroup avahi 69 grep "^avahi:" /etc/group > /dev/null || addgroup avahi
68 grep avahi /etc/passwd || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi 70 grep "^avahi:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi
69 71
70 DBUSPID=`pidof dbus-daemon` 72 DBUSPID=`pidof dbus-daemon`
71 73
@@ -74,7 +76,28 @@ pkg_postinst_avahi-daemon () {
74 fi 76 fi
75} 77}
76 78
79pkg_postinst_avahi-autoipd () {
80 # can't do this offline
81 if [ "x$D" != "x" ]; then
82 exit 1
83 fi
84 grep "^avahi-autoipd:" /etc/group > /dev/null || addgroup avahi-autoipd
85 grep "^avahi-autoipd:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/avahi-autoipd --no-create-home avahi-autoipd --ingroup avahi-autoipd -g "Avahi autoip daemon"
86}
87
77pkg_postrm_avahi-daemon () { 88pkg_postrm_avahi-daemon () {
78 deluser avahi || true 89 deluser avahi || true
79 delgroup avahi || true 90 delgroup avahi || true
80} 91}
92
93pkg_postrm_avahi-autoipd () {
94 deluser avahi-autoipd || true
95 delgroup avahi-autoipd || true
96}
97
98do_install_avahi-autoipd() {
99 autotools_do_install
100 install -d ${D}${sysconfdir}/udhcpc.d
101 install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d
102 install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d
103}
diff --git a/meta/packages/avahi/avahi_0.6.23.bb b/meta/packages/avahi/avahi_0.6.23.bb
index febd7f0760..642b6b916c 100644
--- a/meta/packages/avahi/avahi_0.6.23.bb
+++ b/meta/packages/avahi/avahi_0.6.23.bb
@@ -1,7 +1,7 @@
1require avahi.inc 1require avahi.inc
2 2
3RDEPENDS_avahi-daemon = "sysvinit-pidof" 3RDEPENDS_avahi-daemon = "sysvinit-pidof"
4PR = "r7" 4PR = "r8"
5 5
6FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \ 6FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \
7 ${sysconfdir}/avahi/avahi-autoipd.action \ 7 ${sysconfdir}/avahi/avahi-autoipd.action \
diff --git a/meta/packages/avahi/files/00avahi-autoipd b/meta/packages/avahi/files/00avahi-autoipd
new file mode 100644
index 0000000000..a0ab814603
--- /dev/null
+++ b/meta/packages/avahi/files/00avahi-autoipd
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
4
5case "$1" in
6
7 deconfig|renew|bound)
8 /usr/sbin/avahi-autoipd -k $interface 2> /dev/null
9 ;;
10esac
diff --git a/meta/packages/avahi/files/99avahi-autoipd b/meta/packages/avahi/files/99avahi-autoipd
new file mode 100644
index 0000000000..234cdaa3eb
--- /dev/null
+++ b/meta/packages/avahi/files/99avahi-autoipd
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
4
5case "$1" in
6
7 leasefail)
8 /usr/sbin/avahi-autoipd -wD $interface 2> /dev/null
9 ;;
10esac