packages: nss_mdns/nss_mdns.spec - undo changes made by %post in %postun

jajcus jajcus at pld-linux.org
Sun May 2 19:30:22 CEST 2010


Author: jajcus                       Date: Sun May  2 17:30:22 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- undo changes made by %post in %postun

---- Files affected:
packages/nss_mdns:
   nss_mdns.spec (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: packages/nss_mdns/nss_mdns.spec
diff -u packages/nss_mdns/nss_mdns.spec:1.12 packages/nss_mdns/nss_mdns.spec:1.13
--- packages/nss_mdns/nss_mdns.spec:1.12	Sun May  2 19:15:42 2010
+++ packages/nss_mdns/nss_mdns.spec	Sun May  2 19:30:17 2010
@@ -21,6 +21,7 @@
 Requires(post):	/etc/nsswitch.conf
 Requires(post): grep
 Requires(post): sed
+Requires(postun): sed
 %{!?with_legacy:Requires:	avahi}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -68,6 +69,11 @@
 	sed -i -e's/^\(hosts:.*\)dns\(.*\)/\1mdns4_minimal [NOTFOUND=return] dns mdns4\2/' /etc/nsswitch.conf
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+	sed -i -r -e's/mdns4(_minimal)?( \[NOTFOUND=return\])?( |$)//g' /etc/nsswitch.conf || :
+fi
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -82,6 +88,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.13  2010/05/02 17:30:17  jajcus
+- undo changes made by %post in %postun
+
 Revision 1.12  2010/05/02 17:15:42  jajcus
 - do not build the insecure legacy (no-avahi) code by default
 - avahi bcond also added
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nss_mdns/nss_mdns.spec?r1=1.12&r2=1.13&f=u



More information about the pld-cvs-commit mailing list