diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-10-13 13:02:35 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-10-13 13:02:35 +0000 |
commit | 4c7fc919401ac29174e40d794e85d4d6c20de270 (patch) | |
tree | 44cad42c90119101d1d4086ecbc1c289fadb1d8e /meta/packages/avahi/avahi.inc | |
parent | 5c7adfa4aad0755582561c3469d6848f115d8168 (diff) | |
download | poky-4c7fc919401ac29174e40d794e85d4d6c20de270.tar.gz |
avahi: create/remove 'avahi-autoipd' user (from OE)
Patch from Cyril Humbert <cyril.humbert@martec.fr>
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5483 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/avahi/avahi.inc')
-rw-r--r-- | meta/packages/avahi/avahi.inc | 27 |
1 files changed, 25 insertions, 2 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" | |||
9 | RRECOMMENDS_avahi-daemon = "libnss-mdns" | 9 | RRECOMMENDS_avahi-daemon = "libnss-mdns" |
10 | 10 | ||
11 | SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \ | 11 | SRC_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 | ||
14 | inherit autotools pkgconfig update-rc.d | 16 | inherit 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 | ||
79 | pkg_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 | |||
77 | pkg_postrm_avahi-daemon () { | 88 | pkg_postrm_avahi-daemon () { |
78 | deluser avahi || true | 89 | deluser avahi || true |
79 | delgroup avahi || true | 90 | delgroup avahi || true |
80 | } | 91 | } |
92 | |||
93 | pkg_postrm_avahi-autoipd () { | ||
94 | deluser avahi-autoipd || true | ||
95 | delgroup avahi-autoipd || true | ||
96 | } | ||
97 | |||
98 | do_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 | } | ||