Author: glen                         Date: Mon Nov  3 23:32:35 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- update to 0.12
- NOTE: templates have been renamed (trigger handles smooth upgrade)

---- Files affected:
SPECS:
   nagios-notify.spec (1.19 -> 1.20) 

---- Diffs:

================================================================
Index: SPECS/nagios-notify.spec
diff -u SPECS/nagios-notify.spec:1.19 SPECS/nagios-notify.spec:1.20
--- SPECS/nagios-notify.spec:1.19       Sat Oct 11 17:03:43 2008
+++ SPECS/nagios-notify.spec    Tue Nov  4 00:32:30 2008
@@ -2,7 +2,7 @@
 Summary:       Nagios Notify Script
 Summary(pl.UTF-8):     Skrypt powiadamiajÄ…cy dla Nagiosa
 Name:          nagios-notify
-Version:       0.11
+Version:       0.12
 Release:       1
 License:       GPL v2
 Group:         Applications
@@ -65,6 +65,30 @@
        %service -q nagios reload
 fi
 
+%triggerpostun -- %{name} < 0.12-0.7
+# recover renamed configs
+for a in %{_sysconfdir}/templates/*.rpmsave; do
+       [ -f $a ] || continue
+       f=${a%%.rpmsave}
+       [ -f $f ] && cp -f $f{,.rpmnew}
+       mv -f $f{.rpmsave,}
+done
+# copy from new files if originals weren't modified but removed by upgrade
+for a in eggdrop jabber sms; do
+       o=%{_sysconfdir}/templates/host-notify-by-$a.tmpl
+       f=%{_sysconfdir}/templates/notify-host-by-$a.tmpl
+       if [ ! -f $o ]; then
+               cp -a $f $o
+       fi
+done
+for a in eggdrop email jabber-embedimage jabber-richtext jabber sms; do
+       o=%{_sysconfdir}/templates/notify-by-$a.tmpl
+       f=%{_sysconfdir}/templates/notify-service-by-$a.tmpl
+       if [ ! -f $o ]; then
+               cp -a $f $o
+       fi
+done
+
 %files
 %defattr(644,root,root,755)
 %dir %{_sysconfdir}/templates
@@ -78,6 +102,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.20  2008/11/03 23:32:30  glen
+- update to 0.12
+- NOTE: templates have been renamed (trigger handles smooth upgrade)
+
 Revision 1.19  2008/10/11 15:03:43  glen
 - 0.11: added $(encode_mime_header:CHARSET,DATA) handler
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/nagios-notify.spec?r1=1.19&r2=1.20&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to