packages: nss_db/nss_db.spec - remove db from nss config on package removal...

glen glen at pld-linux.org
Thu Feb 9 23:59:23 CET 2012


Author: glen                         Date: Thu Feb  9 22:59:22 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- remove db from nss config on package removal, like nss_myhostname not my fantasy

---- Files affected:
packages/nss_db:
   nss_db.spec (1.47 -> 1.48) 

---- Diffs:

================================================================
Index: packages/nss_db/nss_db.spec
diff -u packages/nss_db/nss_db.spec:1.47 packages/nss_db/nss_db.spec:1.48
--- packages/nss_db/nss_db.spec:1.47	Thu Feb  9 23:57:16 2012
+++ packages/nss_db/nss_db.spec	Thu Feb  9 23:59:17 2012
@@ -48,7 +48,7 @@
 BuildRequires:	libtool
 Requires:	glibc >= 6:2.3
 Requires:	make
-Requires(post):	/sbin/ldconfig
+Requires:	sed >= 4.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # glibc private symbols
@@ -173,6 +173,15 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post	-p /sbin/ldconfig
+
+%preun
+if [ "$1" -eq 0 -a -f %{_sysconfdir}/nsswitch.conf ] ; then
+	%{__sed} -i -e '
+		/^\(passwd\|group\|ethers\|protocols\|rpc\|services\|shadow\|netgroup\|hosts\):/ !b
+		s/[[:blank:]]\+db\>//
+	' %{_sysconfdir}/nsswitch.conf
+fi
+
 %postun -p /sbin/ldconfig
 
 %files -f %{name}.lang
@@ -192,6 +201,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.48  2012/02/09 22:59:17  glen
+- remove db from nss config on package removal, like nss_myhostname not my fantasy
+
 Revision 1.47  2012/02/09 22:57:16  glen
 - new upstream, up to 2.5 (NFY as does not build)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nss_db/nss_db.spec?r1=1.47&r2=1.48&f=u



More information about the pld-cvs-commit mailing list