From: Theodore Ts'o Date: Fri, 29 Aug 2008 23:53:34 +0000 (-0400) Subject: debian: Fix postinstall scripts when the user/group is in LDAP X-Git-Tag: v1.41.1~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26f29164a43f401cb1746e4f06312b7d70ee7d4a;p=thirdparty%2Fe2fsprogs.git debian: Fix postinstall scripts when the user/group is in LDAP Addresses-Debian-Bug: #497010 Signed-off-by: "Theodore Ts'o" --- diff --git a/debian/libuuid1.postinst b/debian/libuuid1.postinst index 27ca20523..5336fcfdf 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 36cd7b969..3c1adb632 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