diff options
Diffstat (limited to 'extra/rtkit/rtkit.install')
-rw-r--r-- | extra/rtkit/rtkit.install | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/extra/rtkit/rtkit.install b/extra/rtkit/rtkit.install new file mode 100644 index 000000000..0ec1fab52 --- /dev/null +++ b/extra/rtkit/rtkit.install @@ -0,0 +1,26 @@ +post_install() { + getent group rtkit &>/dev/null || /usr/sbin/groupadd -g 133 rtkit || return 1 + getent passwd rtkit &>/dev/null || /usr/sbin/useradd -u 133 -g rtkit -c 'RealtimeKit' -s /sbin/nologin -d /proc rtkit || return 1 + + dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 + + true +} + +post_upgrade() { + if (( $(vercmp $2 0.10) < 0 )); then + # Get rid of old user and group + post_remove + fi + + post_install +} + +post_remove() { + getent passwd rtkit &>/dev/null && /usr/sbin/userdel -f rtkit + getent group rtkit &>/dev/null && /usr/sbin/groupdel rtkit + + true +} + +# vim:set ts=2 sw=2 et: |