[arch-commits] Commit in rtkit/trunk (PKGBUILD rtkit.install)

Jan Steffens heftig at archlinux.org
Fri Feb 27 12:49:05 UTC 2015


    Date: Friday, February 27, 2015 @ 13:49:05
  Author: heftig
Revision: 232070

don't remove user

Modified:
  rtkit/trunk/PKGBUILD
  rtkit/trunk/rtkit.install

---------------+
 PKGBUILD      |    2 +-
 rtkit.install |   25 +++++++------------------
 2 files changed, 8 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-02-27 12:41:35 UTC (rev 232069)
+++ PKGBUILD	2015-02-27 12:49:05 UTC (rev 232070)
@@ -4,7 +4,7 @@
 
 pkgname=rtkit
 pkgver=0.11
-pkgrel=4
+pkgrel=5
 pkgdesc="Realtime Policy and Watchdog Daemon"
 arch=(i686 x86_64)
 url="http://git.0pointer.de/?p=rtkit.git"

Modified: rtkit.install
===================================================================
--- rtkit.install	2015-02-27 12:41:35 UTC (rev 232069)
+++ rtkit.install	2015-02-27 12:49:05 UTC (rev 232070)
@@ -1,26 +1,15 @@
 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
+  if ! getent passwd rtkit &>/dev/null; then
+    groupadd -g 133 rtkit
+    useradd -u 133 -g rtkit -c 'RealtimeKit' -s /bin/false -d /proc rtkit
+  fi
 
-  dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1
-
-  true
+  post_upgrade
 }
 
 post_upgrade() {
-  if (( $(vercmp $2 0.10) < 0 )); then
-    # Get rid of old user and group
-    post_remove
-  fi
-
-  post_install
+  dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig &>/dev/null
+  return 0
 }
 
-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:



More information about the arch-commits mailing list