diff options
author | Saul Wold <sgw@linux.intel.com> | 2011-10-27 16:08:40 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-30 16:38:08 +0000 |
commit | 9f542cf85619a8422aff6d904382eceb7f801842 (patch) | |
tree | cc2cc1bc63d4b7934e80b0ff65c7b2666aef7332 /meta/recipes-connectivity/avahi | |
parent | 398a0159a6b26047862ebe6f7d024bf2de890289 (diff) | |
download | poky-9f542cf85619a8422aff6d904382eceb7f801842.tar.gz |
avahi: use useradd to create avahi user for avahi-daemon
DBus was failing to start correct since the avahi user was
not setup.
Keep the dbus reload since this could still be installed
as a package an would require a dbus restart.
Fixes: [YOCTO #1699]
(From OE-Core rev: f0bfecc8a0af1c4c76a37a9c88f334ab6ae7e7ef)
(From OE-Core rev: 925c7cd5c3ff44a4d0f2c71d0029998bfd00db48)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/avahi')
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc index c3c9c71985..61ff2bf530 100644 --- a/meta/recipes-connectivity/avahi/avahi.inc +++ b/meta/recipes-connectivity/avahi/avahi.inc | |||
@@ -14,7 +14,7 @@ SECTION = "network" | |||
14 | # python scripts are under GPLv2+ | 14 | # python scripts are under GPLv2+ |
15 | LICENSE = "GPLv2+ & LGPLv2.1+" | 15 | LICENSE = "GPLv2+ & LGPLv2.1+" |
16 | 16 | ||
17 | INC_PR = "r7" | 17 | INC_PR = "r8" |
18 | 18 | ||
19 | DEPENDS = "expat libcap libdaemon dbus glib-2.0" | 19 | DEPENDS = "expat libcap libdaemon dbus glib-2.0" |
20 | 20 | ||
@@ -23,7 +23,12 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ | |||
23 | file://99avahi-autoipd \ | 23 | file://99avahi-autoipd \ |
24 | file://initscript.patch" | 24 | file://initscript.patch" |
25 | 25 | ||
26 | inherit autotools pkgconfig update-rc.d gettext | 26 | USERADD_PACKAGES = "${PN}-daemon" |
27 | USERADD_PARAM_${PN}-daemon = "--system --home /var/run/avahi-daemon \ | ||
28 | --no-create-home --shell /bin/false \ | ||
29 | --user-group avahi" | ||
30 | |||
31 | inherit autotools pkgconfig update-rc.d gettext useradd | ||
27 | 32 | ||
28 | EXTRA_OECONF = "--with-distro=debian \ | 33 | EXTRA_OECONF = "--with-distro=debian \ |
29 | --disable-introspection \ | 34 | --disable-introspection \ |
@@ -114,15 +119,12 @@ do_install_avahi-autoipd() { | |||
114 | install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d | 119 | install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d |
115 | } | 120 | } |
116 | 121 | ||
117 | # At the time the postinst runs, dbus might not be setup so only restart if running | 122 | # At the time the postinst runs, dbus might not be setup so only restart if running |
118 | 123 | ||
119 | pkg_postinst_avahi-daemon () { | 124 | pkg_postinst_avahi-daemon () { |
120 | # can't do this offline | ||
121 | if [ "x$D" != "x" ]; then | 125 | if [ "x$D" != "x" ]; then |
122 | exit 1 | 126 | exit 0 |
123 | fi | 127 | fi |
124 | grep "^avahi:" /etc/group > /dev/null || addgroup avahi | ||
125 | grep "^avahi:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi | ||
126 | 128 | ||
127 | DBUSPID=`pidof dbus-daemon` | 129 | DBUSPID=`pidof dbus-daemon` |
128 | 130 | ||