# HG changeset patch # User carl # Date 1154579614 25200 # Node ID 8e813497582ec82bf85a7452d2e16b329218c03c # Parent f9917ce924a32c3b2f93cdc07576229237f5b748 fix rpm scripts diff -r f9917ce924a3 -r 8e813497582e dnsbl.spec.in --- a/dnsbl.spec.in Wed Aug 02 21:06:05 2006 -0700 +++ b/dnsbl.spec.in Wed Aug 02 21:33:34 2006 -0700 @@ -67,10 +67,10 @@ %pre -/usr/bin/getent passwd @PACKAGE@ >/dev/null || useradd -r -d %{_sysconfdir}/@PACKAGE@ -M -c "@PACKAGE@ pseudo-user" -s /sbin/nologin @PACKAGE@ %post +/usr/bin/getent passwd @PACKAGE@ >/dev/null || useradd -r -d %{_sysconfdir}/@PACKAGE@ -M -c "@PACKAGE@ pseudo-user" -s /sbin/nologin @PACKAGE@ /sbin/chkconfig --add @PACKAGE@ echo Remember to edit %{_sysconfdir}/@PACKAGE@/@PACKAGE@.conf and add the following line to your sendmail.mc: echo "INPUT_MAIL_FILTER(\`dnsbl', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:5m;R:5m;E:5m')" @@ -79,11 +79,11 @@ %preun /sbin/service @PACKAGE@ stop || : -/sbin/chkconfig --del @PACKAGE@ -userdel @PACKAGE@ || : %postun +[ $1 = 0 ] && /sbin/chkconfig --del @PACKAGE@ +[ $1 = 0 ] && userdel @PACKAGE@ || : %clean @@ -100,6 +100,9 @@ %changelog +* Wed Aug 02 2006 Carl Byington 5.20 +- http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html help with postun + * Thu Mar 16 2006 Carl Byington 5.16 - use @PACKAGE@ in more places