rpms/logwatch/devel logwatch-7.3.6-cron_conf.patch, NONE, 1.1 logwatch.spec, 1.113, 1.114

Ivana Varekova varekova at fedoraproject.org
Thu Jun 25 13:40:12 UTC 2009


Author: varekova

Update of /cvs/pkgs/rpms/logwatch/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9473

Modified Files:
	logwatch.spec 
Added Files:
	logwatch-7.3.6-cron_conf.patch 
Log Message:
- add the possibility to switch of cron job (#493063)


logwatch-7.3.6-cron_conf.patch:

--- NEW FILE logwatch-7.3.6-cron_conf.patch ---
diff -up logwatch-7.3.6/conf/logwatch.conf.pom logwatch-7.3.6/conf/logwatch.conf
--- logwatch-7.3.6/conf/logwatch.conf.pom	2009-06-25 10:47:22.000000000 +0200
+++ logwatch-7.3.6/conf/logwatch.conf	2009-06-25 10:47:00.000000000 +0200
@@ -121,4 +121,10 @@ mailer = "sendmail -t"
 #
 #HostLimit = Yes
 
+# By default the cron daemon generates daily logwatch report
+# if you want to switch it off uncomment DailyReport tag. 
+# The implicit value is Yes
+#
+# DailyReport = No
+
 # vi: shiftwidth=3 tabstop=3 et


Index: logwatch.spec
===================================================================
RCS file: /cvs/pkgs/rpms/logwatch/devel/logwatch.spec,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -p -r1.113 -r1.114
--- logwatch.spec	15 Jun 2009 09:15:06 -0000	1.113
+++ logwatch.spec	25 Jun 2009 13:39:39 -0000	1.114
@@ -1,7 +1,7 @@
 Summary: A log file analysis program
 Name: logwatch
 Version: 7.3.6
-Release: 43%{?dist}
+Release: 44%{?dist}
 License: MIT
 Group: Applications/System
 URL: http://www.logwatch.org/
@@ -52,6 +52,7 @@ Patch52: logwatch-7.3.6-smartd.patch
 Patch53: logwatch-7.3.6-sshd2.patch
 Patch54: logwatch-7.3.6-exim2.patch
 Patch55: logwatch-7.3.6-removeservice.patch
+Patch56: logwatch-7.3.6-cron_conf.patch
 Requires: textutils sh-utils grep mailx
 Requires: perl(Date::Manip)
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -111,6 +112,7 @@ of the package on many systems.
 %patch53 -p1
 %patch54 -p1
 %patch55 -p1
+%patch56 -p1
 rm -f scripts/services/*.orig
 
 %build
@@ -166,8 +168,20 @@ chmod 644 %{buildroot}%{_datadir}/logwat
 chmod 644 %{buildroot}%{_datadir}/logwatch/scripts/services/courier
 chmod 644 %{buildroot}%{_datadir}/logwatch/scripts/services/dpkg
 
+# install cron script
 install -m 0755 -d %{buildroot}%{_sysconfdir}/cron.daily
-ln -s ../../%{_datadir}/logwatch/scripts/logwatch.pl %{buildroot}/%{_sysconfdir}/cron.daily/0logwatch
+cat >  %{buildroot}/%{_sysconfdir}/cron.daily/0logwatch <<EOF
+#!/bin/bash
+
+DailyReport=`grep -e "^[[:space:]]*DailyReport[[:space:]]*=[[:space:]]*" /usr/share/logwatch/default.conf/logwatch.conf | head -n1 | sed -e "s|^\s*DailyReport\s*=\s*||"`
+
+if [ $DailyReport != "No" ] && [ $DailyReport != "no" ]
+then
+    logwatch
+fi
+EOF
+chmod 755 %{buildroot}/%{_sysconfdir}/cron.daily/0logwatch
+
 install -m 0755 -d %{buildroot}%{_sbindir}
 ln -s ../../%{_datadir}/logwatch/scripts/logwatch.pl %{buildroot}/%{_sbindir}/logwatch
 
@@ -222,6 +236,9 @@ rm -rf %{buildroot}
 %doc License project/CHANGES 
 
 %changelog
+* Thu Jun 25 2009 Ivana Varekova <varekova at redhat.com> 7.3.6-44
+- add the possibility to switch of cron job (#493063)
+
 * Mon Jun 15 2009 Ivana Varekova <varekova at redhat.com> 7.3.6-43
 - fix removeservice script - to decrease the number of 
   perl instances running simultaneously




More information about the fedora-extras-commits mailing list