core/dbus-core/dbus.install

26 lines
598 B
Plaintext
Raw Normal View History

2010-03-13 23:25:19 +08:00
post_install() {
2012-09-09 12:17:16 +08:00
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
dbus-uuidgen --ensure
ln /var/lib/dbus/machine-id /etc/machine-id
2010-03-13 23:25:19 +08:00
}
post_upgrade() {
post_install
2012-09-09 12:17:16 +08:00
# 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
2010-03-13 23:25:19 +08:00
fi
}
post_remove() {
if getent passwd dbus >/dev/null; then
2012-09-09 12:17:16 +08:00
userdel dbus
2010-03-13 23:25:19 +08:00
fi
if getent group dbus >/dev/null; then
2012-09-09 12:17:16 +08:00
groupdel dbus
2010-03-13 23:25:19 +08:00
fi
}