]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix users and groups creation in nscd %post script
authorAndreas Schwab <schwab@redhat.com>
Mon, 31 May 2010 14:37:00 +0000 (16:37 +0200)
committerAndreas Schwab <schwab@redhat.com>
Mon, 31 May 2010 15:51:37 +0000 (17:51 +0200)
fedora/glibc.spec.in

index ee1363358202c2e46617c771d1e0d7f7bd03f33d..96624f25006bb05a2d37f65b1fa3da2731a086f1 100644 (file)
@@ -894,8 +894,10 @@ fi
 %postun utils -p /sbin/ldconfig
 
 %pre -n nscd
-/usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
-  -c "NSCD Daemon" -u 28 nscd > /dev/null 2>&1 || :
+getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
+getent passwd nscd >/dev/null ||
+  /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
+                   -c "NSCD Daemon" -u 28 -g nscd nscd
 
 %post -n nscd
 /sbin/chkconfig --add nscd