diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2012-12-17 11:46:46 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-19 17:54:55 +0000 |
commit | 83242c81ecb26670247ac71cc3cec6179bbe3166 (patch) | |
tree | ffb395912a892ce5527e059e362148733814c32e /meta/recipes-connectivity | |
parent | 3929b60c05f51688790f2ab9d6ac1eab1bfbb02b (diff) | |
download | poky-83242c81ecb26670247ac71cc3cec6179bbe3166.tar.gz |
avahi: use useradd.bbclass to add avahi-autoipd user
This is needed for the postinstalls to be run at do_rootfs time.
[YOCTO #3605]
(From OE-Core rev: 878cb7b76b19b03c51aa368b0bc037647c844a21)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r-- | meta/recipes-connectivity/avahi/avahi.inc | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc index a0a1681ab3..d529b37996 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 = "r5" | 17 | INC_PR = "r6" |
18 | 18 | ||
19 | DEPENDS = "expat libcap libdaemon dbus glib-2.0" | 19 | DEPENDS = "expat libcap libdaemon dbus glib-2.0" |
20 | 20 | ||
@@ -26,11 +26,17 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ | |||
26 | file://fix_for_automake_1.12.x.patch \ | 26 | file://fix_for_automake_1.12.x.patch \ |
27 | " | 27 | " |
28 | 28 | ||
29 | USERADD_PACKAGES = "avahi-daemon" | 29 | USERADD_PACKAGES = "avahi-daemon avahi-autoipd" |
30 | USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \ | 30 | USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \ |
31 | --no-create-home --shell /bin/false \ | 31 | --no-create-home --shell /bin/false \ |
32 | --user-group avahi" | 32 | --user-group avahi" |
33 | 33 | ||
34 | USERADD_PARAM_avahi-autoipd = "--system --home /var/run/avahi-autoipd \ | ||
35 | --no-create-home --shell /bin/false \ | ||
36 | --user-group \ | ||
37 | -c \"Avahi autoip daemon\" \ | ||
38 | avahi-autoipd" | ||
39 | |||
34 | inherit autotools pkgconfig update-rc.d gettext useradd | 40 | inherit autotools pkgconfig update-rc.d gettext useradd |
35 | 41 | ||
36 | EXTRA_OECONF = "--with-distro=debian \ | 42 | EXTRA_OECONF = "--with-distro=debian \ |
@@ -137,15 +143,6 @@ if [ -z "$D" ]; then | |||
137 | fi | 143 | fi |
138 | } | 144 | } |
139 | 145 | ||
140 | pkg_postinst_avahi-autoipd () { | ||
141 | # can't do this offline | ||
142 | if [ "x$D" != "x" ]; then | ||
143 | exit 1 | ||
144 | fi | ||
145 | grep "^avahi-autoipd:" /etc/group > /dev/null || addgroup avahi-autoipd | ||
146 | 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" | ||
147 | } | ||
148 | |||
149 | pkg_postrm_avahi-daemon () { | 146 | pkg_postrm_avahi-daemon () { |
150 | deluser avahi || true | 147 | deluser avahi || true |
151 | delgroup avahi || true | 148 | delgroup avahi || true |