tags 497010 +pending
thanks

On Fri, Aug 29, 2008 at 05:18:02PM +1000, Alex Samad wrote:
> My group libuuid is in my ldap DB, install of package fails unless I
> place it in my /etc/group file
> 
> Whilst checking the postinst file I also notice you check for user in
> /etc/passwd - my user is kept in ldap, maybe a check against gentent
> passwd would be better !

Thanks, the following patch should address your issue.

                                                        - Ted

commit 5e10c242cfe5ae02d5326bd094d1ebdf347ff873
Author: Theodore Ts'o <[EMAIL PROTECTED]>
Date:   Fri Aug 29 19:53:34 2008 -0400

    debian: Fix postinstall scripts when the user/group is in LDAP
    
    Addresses-Debian-Bug: #497010
    
    Signed-off-by: "Theodore Ts'o" <[EMAIL PROTECTED]>

diff --git a/debian/libuuid1.postinst b/debian/libuuid1.postinst
index 27ca205..5336fcf 100644
--- a/debian/libuuid1.postinst
+++ b/debian/libuuid1.postinst
@@ -24,9 +24,10 @@ if test -z "$LAST_SYSTEM_GID"; then
     LAST_SYSTEM_GID=999
 fi
 
-groupadd -f -K GID_MIN=$FIRST_SYSTEM_GID -K GID_MAX=$LAST_SYSTEM_GID libuuid
-
-if ! grep -q libuuid /etc/passwd; then
+if ! getent group | grep -q libuuid; then
+  groupadd -f -K GID_MIN=$FIRST_SYSTEM_GID -K GID_MAX=$LAST_SYSTEM_GID libuuid
+fi
+if ! getent passwd | grep -q libuuid; then
    useradd -d /var/lib/libuuid -K UID_MIN=$FIRST_SYSTEM_UID -K 
UID_MAX=$LAST_SYSTEM_UID -g libuuid libuuid
 fi
 
diff --git a/debian/uuid-runtime.postinst b/debian/uuid-runtime.postinst
index 36cd7b9..3c1adb6 100644
--- a/debian/uuid-runtime.postinst
+++ b/debian/uuid-runtime.postinst
@@ -1,8 +1,10 @@
 #!/bin/sh
 
 set -e
+if ! getent group | grep -q libuuid; then
 groupadd -f -K GID_MIN=1 -K GID_MAX=999 libuuid
-if ! grep -q libuuid /etc/passwd; then
+fi
+if ! getent passwd | grep -q libuuid; then
    useradd -d /var/lib/libuuid -K UID_MIN=1 -K UID_MAX=499 -g libuuid libuuid
 fi
 chown libuuid:libuuid /usr/sbin/uuidd



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to