rpms/pdns/devel pdns.spec,1.1,1.2

Ruben Kerkhof (ruben) fedora-extras-commits at redhat.com
Mon Jan 1 13:52:54 UTC 2007


Author: ruben

Update of /cvs/extras/rpms/pdns/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29204

Modified Files:
	pdns.spec 
Log Message:
Check if user pdns exists before adding it



Index: pdns.spec
===================================================================
RCS file: /cvs/extras/rpms/pdns/devel/pdns.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pdns.spec	30 Dec 2006 19:00:30 -0000	1.1
+++ pdns.spec	1 Jan 2007 13:52:24 -0000	1.2
@@ -1,7 +1,7 @@
 Summary:	A modern, advanced and high performance authoritative-only nameserver
 Name:		pdns
 Version:	2.9.20
-Release:	5%{?dist}
+Release:	6%{?dist}
 
 Group:		System Environment/Daemons
 License:	GPL
@@ -105,7 +105,10 @@
 %post
 if [ $1 = 1 ]; then
 	/sbin/chkconfig --add pdns
-	%{_sbindir}/useradd -c "PowerDNS user" -s /sbin/nologin -r -d / pdns
+	userid = `id -u pdns 2>/dev/null`
+	if [ x"$userid" = x ]; then
+		%{_sbindir}/useradd -c "PowerDNS user" -s /sbin/nologin -r -d / pdns > /dev/null || :
+	fi
 fi
 %preun
 if [ "$1" = 0 ]; then
@@ -163,6 +166,8 @@
 
 
 %changelog
+* Mon Jan 1 2007 <ruben at rubenkerkhof.com> 2.9.20-6
+- Check if user pdns exists before adding it
 * Sat Dec 30 2006 <ruben at rubenkerkhof.com> 2.9.20-5
 - Strip rpath from the backends as well
 * Fri Dec 29 2006 <ruben at rubenkerkhof.com> 2.9.20-4




More information about the scm-commits mailing list