From c0d19944e2dde7822b2ad4777999febbf8375db1 Mon Sep 17 00:00:00 2001 From: ms Date: Wed, 22 Aug 2007 17:24:39 +0000 Subject: [PATCH] Logwatch - Experimental. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@802 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- doc/packages-list.txt | 1 + lfs/logwatch | 55 ++++++++++++++++++++----------------------- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/doc/packages-list.txt b/doc/packages-list.txt index 26056df02c..cfb87463e6 100644 --- a/doc/packages-list.txt +++ b/doc/packages-list.txt @@ -153,6 +153,7 @@ * linux-libc-headers-2.6.12.0 * linuxigd-0.95 * logrotate-3.7.1 +* logwatch-7.3.6 * logwatch_7.3.1 * lsof-4.78 * lzo-2.02 diff --git a/lfs/logwatch b/lfs/logwatch index 406e1db861..39c6244bd1 100644 --- a/lfs/logwatch +++ b/lfs/logwatch @@ -26,10 +26,10 @@ include Config -VER = 7.3.1 +VER = 7.3.6 -THISAPP = logwatch_$(VER) -DL_FILE = $(THISAPP).orig.tar.gz +THISAPP = logwatch-$(VER) +DL_FILE = $(THISAPP).tar.gz DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/logwatch-$(VER) TARGET = $(DIR_INFO)/$(THISAPP) @@ -42,7 +42,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = c43a783e791ad4851f44c6af98d71b38 +$(DL_FILE)_MD5 = 937d982006b2a76a83edfcfd2e5a9d7d install : $(TARGET) @@ -72,41 +72,38 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - -mkdir -p /etc/log.d /var/log/logwatch - chown logwatch:nobody /var/log/logwatch - cd $(DIR_APP) && cp -Rf conf scripts lib /etc/log.d - cd $(DIR_APP) && install -m 0755 scripts/logwatch.pl /etc/log.d/scripts/logwatch.pl - cd $(DIR_APP) && install -m 0644 logwatch.8 /usr/share/man/man8 - sed -i 's/^Print = .*$$/Print = Yes/' /etc/log.d/conf/logwatch.conf + cd $(DIR_APP) && sed -e "s/^TEMPDIR=.*/TEMPDIR=\"\/tmp\"/g" -i install_logwatch.sh + @cd $(DIR_APP) && chmod 755 install_logwatch.sh + cd $(DIR_APP) && yes "" | ./install_logwatch.sh + + #sed -i 's/^Print = .*$$/Print = Yes/' /etc/log.d/conf/logwatch.conf # comment out line with unused example - sed -i '/-zz-network/s/Service/#Service/' /etc/log.d/conf/logwatch.conf - # fix typo in output - sed -i '/MB transfered/s/transfered/transferred/' /etc/log.d/scripts/services/http + #sed -i '/-zz-network/s/Service/#Service/' /etc/log.d/conf/logwatch.conf # Strip out some filters for services we don't run - no point wasting log keeping them # cron filter don't support fcron # final selection for remaining files is in rootfile - UNNEEDED="afpd amavis arpwatch audit automount autorpm cisco \ - courier emerge exim extreme-networks ftpd-messages ftpd-xferlog \ - identd in.qpopper ipop3d mountd named netopia netscreen \ - oidentd pam_pwdb portsentry pound pureftp \ - pureftpd qmail rt314 sendmail-largeboxes shaperd smartd \ - sonicwall stunnel tac_acc up2date vpopmail vsftpd windows xferlog yum zz-fortune" && \ - for i in $$UNNEEDED ; do \ - rm -f /etc/log.d/{conf,scripts}/services/$$i{,.conf} /etc/log.d/conf/logfiles/$$i.conf; \ - done - rm -rf /etc/log.d/scripts/logfiles + #UNNEEDED="afpd amavis arpwatch audit automount autorpm cisco \ + # courier emerge exim extreme-networks ftpd-messages ftpd-xferlog \ + # identd in.qpopper ipop3d mountd named netopia netscreen \ + # oidentd pam_pwdb portsentry pound pureftp \ + # pureftpd qmail rt314 sendmail-largeboxes shaperd smartd \ + # sonicwall stunnel tac_acc up2date vpopmail vsftpd windows xferlog yum zz-fortune" && \ + # for i in $$UNNEEDED ; do \ + # rm -f /etc/log.d/{conf,scripts}/services/$$i{,.conf} /etc/log.d/conf/logfiles/$$i.conf; \ + # done + #rm -rf /etc/log.d/scripts/logfiles cp -f $(DIR_SRC)/config/logwatch/dialup /etc/log.d/scripts/services/dialup cp -f $(DIR_SRC)/config/logwatch/dialup.conf /etc/log.d/conf/services/dialup.conf - sed -i 's/df -h/df -h -x rootfs/' /etc/log.d/scripts/services/zz-disk_space - for i in `find /etc/log.d -type f`; do \ - sed -i 's/perl -w/perl/' $$i; \ - done + #sed -i 's/df -h/df -h -x rootfs/' /etc/log.d/scripts/services/zz-disk_space + #for i in `find /etc/log.d -type f`; do \ + # sed -i 's/perl -w/perl/' $$i; \ + #done # The httpd log checker script considers any request containing the word # null to be an exploit attempt, reverse this behaviour as we have a # null.gif - sed -i -e "/ 'null',/d" /etc/log.d/scripts/services/http - chmod -R 755 /etc/log.d + #sed -i -e "/ 'null',/d" /etc/log.d/scripts/services/http + #chmod -R 755 /etc/log.d @rm -rf $(DIR_APP) @$(POSTBUILD) -- 2.39.2