diff options
author | Ross Burton <ross@openedhand.com> | 2007-01-19 18:28:40 +0000 |
---|---|---|
committer | Ross Burton <ross@openedhand.com> | 2007-01-19 18:28:40 +0000 |
commit | 1af800caf4a179f1c6c6d87cc37ced97bece4c89 (patch) | |
tree | 33abb0be0eb89521965f17bfe43c731c34dcd302 /meta/packages/hal | |
parent | 1afa154d3e0ee7c80a4cac5db28f84c7d93954a5 (diff) | |
download | openembedded-core-1af800caf4a179f1c6c6d87cc37ced97bece4c89.tar.gz openembedded-core-1af800caf4a179f1c6c6d87cc37ced97bece4c89.tar.bz2 openembedded-core-1af800caf4a179f1c6c6d87cc37ced97bece4c89.zip |
Create haldaemon user
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1170 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/hal')
-rw-r--r-- | meta/packages/hal/hal_0.5.8.1.bb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/packages/hal/hal_0.5.8.1.bb b/meta/packages/hal/hal_0.5.8.1.bb index 4b2196f875..0ac92bfed2 100644 --- a/meta/packages/hal/hal_0.5.8.1.bb +++ b/meta/packages/hal/hal_0.5.8.1.bb @@ -31,6 +31,27 @@ do_stage() { install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so } +# At the time the postinst runs, dbus might not be setup so only restart if running +pkg_postinst_hal () { + # can't do this offline + if [ "x$D" != "x" ]; then + exit 1 + fi + grep haldaemon /etc/group || addgroup haldaemon + grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL + + DBUSPID=`pidof dbus-daemon` + + if [ "x$DBUSPID" != "x" ]; then + /etc/init.d/dbus-1 force-reload + fi +} + +pkg_postrm_hal () { + deluser haldaemon || true + delgroup haldaemon || true +} + #PACKAGES += "hal-device-manager" #FILES_hal-device-manager = " \ |