[Pkg-utopia-commits] r1897 - in /packages/unstable/hal/debian: changelog hal.postinst

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Sun Dec 2 23:33:36 UTC 2007


Author: biebl
Date: Sun Dec  2 23:33:36 2007
New Revision: 1897

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=1897
Log:
* debian/hal.postinst
  - Remove superfluous getent calls. adduser is clever enough to omit
    creating accounts if they already exist.
  - Don't ignore addgroup errors. 

Modified:
    packages/unstable/hal/debian/changelog
    packages/unstable/hal/debian/hal.postinst

Modified: packages/unstable/hal/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/changelog?rev=1897&op=diff
==============================================================================
--- packages/unstable/hal/debian/changelog (original)
+++ packages/unstable/hal/debian/changelog Sun Dec  2 23:33:36 2007
@@ -1,3 +1,12 @@
+hal (0.5.10-5) UNRELEASED; urgency=low
+
+  * debian/hal.postinst
+    - Remove superfluous getent calls. adduser is clever enough to omit
+      creating accounts if they already exist.
+    - Don't ignore addgroup errors. 
+
+ -- Michael Biebl <biebl at debian.org>  Mon, 03 Dec 2007 00:27:14 +0100
+
 hal (0.5.10-4) unstable; urgency=low
 
   * debian/patches/85_fix_strlist_to_string.patch:

Modified: packages/unstable/hal/debian/hal.postinst
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/hal.postinst?rev=1897&op=diff
==============================================================================
--- packages/unstable/hal/debian/hal.postinst (original)
+++ packages/unstable/hal/debian/hal.postinst Sun Dec  2 23:33:36 2007
@@ -25,21 +25,20 @@
 
 case "$1" in
   configure)
-    if ! getent passwd haldaemon >/dev/null; then 
-      adduser --disabled-password --quiet --system --no-create-home \
-        --gecos "Hardware abstraction layer" --group haldaemon
-    fi
-    if ! getent group powerdev > /dev/null; then
-       addgroup --quiet --system powerdev || true
-    fi
+    adduser --system \
+            --disabled-password \ 
+            --no-create-home \
+            --gecos "Hardware abstraction layer" \
+            --group haldaemon
 
-    # Add the plugdev group
-    if ! getent group plugdev > /dev/null; then
-       addgroup --quiet --system plugdev || true
-    fi
+    # Add the powerdev group (power management)
+    addgroup --quiet --system powerdev
+
+    # Add the plugdev group (mounting removable devices)
+    addgroup --quiet --system plugdev
 
     # be sure the run dir is owned by the hal user
-    chown haldaemon:haldaemon /var/run/hal 2>/dev/null || true
+    chown haldaemon:haldaemon /var/run/hal
 
     if [ -x /etc/init.d/dbus ]; then
       invoke-rc.d dbus force-reload || true




More information about the Pkg-utopia-commits mailing list