]> 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 14:37:00 +0000 (16:37 +0200)
fedora/glibc.spec.in

index d1e2436ad02a6c5da2755880fbc9265ecd11893e..8e674a5ab4644856aca743f920196e13f0c536f0 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