diff options
Diffstat (limited to 'core/dbus-core/dbus.install')
-rw-r--r-- | core/dbus-core/dbus.install | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/core/dbus-core/dbus.install b/core/dbus-core/dbus.install index 44f4475ee..88a568429 100644 --- a/core/dbus-core/dbus.install +++ b/core/dbus-core/dbus.install @@ -1,24 +1,29 @@ post_install() { - getent group dbus >/dev/null || usr/sbin/groupadd -g 81 dbus - getent passwd dbus >/dev/null || usr/sbin/useradd -c 'System message bus' -u 81 -g dbus -d '/' -s /bin/false dbus - usr/bin/passwd -l dbus &>/dev/null - dbus-uuidgen --ensure + getent group dbus >/dev/null || groupadd -g 81 dbus + getent passwd dbus >/dev/null || useradd -c 'System message bus' -u 81 -g dbus -d '/' -s /bin/false dbus + passwd -l dbus &>/dev/null + + if [[ ! -L var/lib/dbus/machine-id ]]; then + [[ -e var/lib/dbus/machine-id && ! -e etc/machine-id ]] && mv var/lib/dbus/machine-id etc/ + ln -sf ../../../etc/machine-id var/lib/dbus/ + fi + dbus-uuidgen --ensure=etc/machine-id } post_upgrade() { post_install - #Make sure new rc script can shutdown running dbus - if [ -f var/run/dbus/pid ]; then - mv var/run/dbus/pid var/run/dbus.pid + # Make sure new rc script can shutdown running dbus + if [ -f run/dbus.pid -a -d run/dbus ]; then + mv run/dbus.pid run/dbus/pid fi } post_remove() { if getent passwd dbus >/dev/null; then - usr/sbin/userdel dbus + userdel dbus fi if getent group dbus >/dev/null; then - usr/sbin/groupdel dbus + groupdel dbus fi } |