[oe-commits] Koen Kooi : distcc: fix startup by creating 'distcc' user

git version control git at git.openembedded.org
Fri Jun 5 16:11:20 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 903a2a4beb8d1661408ac1665f74b84d71a88ad6
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=903a2a4beb8d1661408ac1665f74b84d71a88ad6

Author: Koen Kooi <koen at openembedded.org>
Date:   Tue Jun  2 20:11:21 2009 +0200

distcc: fix startup by creating 'distcc' user

---

 recipes/distcc/distcc_3.1.bb |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/recipes/distcc/distcc_3.1.bb b/recipes/distcc/distcc_3.1.bb
index 879f676..16e7184 100644
--- a/recipes/distcc/distcc_3.1.bb
+++ b/recipes/distcc/distcc_3.1.bb
@@ -3,6 +3,8 @@ compilation of C/C++/ObjC code across machines on a network."
 SECTION = "devel"
 LICENSE = "GPLv2"
 
+PR = "r1"
+
 DEPENDS = "avahi gtk+"
 RRECOMMENDS = "avahi-daemon"
 
@@ -44,3 +46,18 @@ CONFFILES_${PN} += "${sysconfdir}/default/distcc \
 
 FILES_distcc-distmon-gnome = "  ${bindir}/distccmon-gnome \
 				${datadir}/distcc"
+
+
+pkg_postinst_${PN} () {
+    # can't do this offline
+    if [ "x$D" != "x" ]; then
+        exit 1
+    fi
+    grep "^distcc:" /etc/group > /dev/null || addgroup distcc
+    grep "^distcc:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/distcc distcc --ingroup distcc -g "distcc daemon"
+}
+
+pkg_postrm_${PN} () {
+    deluser distcc || true
+    delgroup distcc || true
+}





More information about the Openembedded-commits mailing list