diff options
author | Jared H.Hudson <jhhudso@gentoo.org> | 2003-04-11 06:23:45 +0000 |
---|---|---|
committer | Jared H.Hudson <jhhudso@gentoo.org> | 2003-04-11 06:23:45 +0000 |
commit | 729ee3d316b43aed6ad3842b535069e5164d9d4e (patch) | |
tree | 3c288e1ee3be03aff42517c952c46590ac8f9fd9 /sys-apps/logwatch | |
parent | Update to 4.3.2 and squashed 4 bugs (13303 16016 16576 17746) (diff) | |
download | historical-729ee3d316b43aed6ad3842b535069e5164d9d4e.tar.gz historical-729ee3d316b43aed6ad3842b535069e5164d9d4e.tar.bz2 historical-729ee3d316b43aed6ad3842b535069e5164d9d4e.zip |
Fixed older 2 ebuilds in response to bug #16576
Diffstat (limited to 'sys-apps/logwatch')
-rw-r--r-- | sys-apps/logwatch/ChangeLog | 7 | ||||
-rw-r--r-- | sys-apps/logwatch/logwatch-4.2.1.ebuild | 33 | ||||
-rw-r--r-- | sys-apps/logwatch/logwatch-4.3.1.ebuild | 37 |
3 files changed, 55 insertions, 22 deletions
diff --git a/sys-apps/logwatch/ChangeLog b/sys-apps/logwatch/ChangeLog index a95860d0beca..fa76c3969e87 100644 --- a/sys-apps/logwatch/ChangeLog +++ b/sys-apps/logwatch/ChangeLog @@ -1,7 +1,12 @@ # ChangeLog for sys-apps/logwatch # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/logwatch/ChangeLog,v 1.6 2003/04/11 06:06:38 jhhudso Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/logwatch/ChangeLog,v 1.7 2003/04/11 06:23:45 jhhudso Exp $ + 11 Apr 2003; Jared Hudson <jhhudso@gentoo.org> logwatch-4.2.1.ebuild, + logwatch-4.3.1.ebuild : Changed pkg_postrm() and pkg_postinst() to fix + crontab bug reported in bug # 16576. Credit goes to: + Alessandro Pisani <alextxm@tin.it> + *logwatch-4.3.2 (11 Apr 2003) 11 Apr 2003; Jared Hudson <jhhudso@gentoo.org> : IMPORTANT NOTICE: I have diff --git a/sys-apps/logwatch/logwatch-4.2.1.ebuild b/sys-apps/logwatch/logwatch-4.2.1.ebuild index 187be2bdf2f3..c67850f777ad 100644 --- a/sys-apps/logwatch/logwatch-4.2.1.ebuild +++ b/sys-apps/logwatch/logwatch-4.2.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/logwatch/logwatch-4.2.1.ebuild,v 1.5 2003/03/11 21:11:46 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/logwatch/logwatch-4.2.1.ebuild,v 1.6 2003/04/11 06:23:45 jhhudso Exp $ S=${WORKDIR}/${P} DESCRIPTION="LogWatch, a customizable log analysis system" @@ -16,6 +16,8 @@ DEPEND="virtual/glibc SLOT="0" KEYWORDS="x86" LICENSE="as-is" +IUSE="" +RDEPEND="" src_install() { dodir /usr/share/logwatch @@ -36,11 +38,10 @@ src_install() { if [ $(ls $i | wc -l) -ne 0 ] ; then file="`echo $i | awk -F/ '{ print $3 }'`" dodir /usr/share/logwatch/scripts/logfiles/$file - exeinto /usr/share/logwatch/scripts/logfiles/$file for l in scripts/logfiles/$file/* ; do subfile="`echo $l | awk -F/ '{ print $4 }'`" - newexe $l $subfile + newexe $l $subfile done fi done @@ -64,7 +65,7 @@ src_install() { for i in conf/logfiles/* ; do doins $i done - + insinto /usr/share/logwatch/conf/services for i in conf/services/* ; do doins $i @@ -81,12 +82,24 @@ pkg_postinst() { einfo "adding executable to path..." ln -sf ${ROOT}usr/share/logwatch/scripts/logwatch.pl ${ROOT}usr/bin/logwatch - einfo "adding to cron..." - echo "0 0 * * * ${ROOT}usr/share/logwatch/scripts/logwatch.pl 2>&1 > /dev/null" >> ${ROOT}var/spool/cron/crontabs/root - } + # this will avoid duplicate entries in the crontab + if [ "`grep logwatch.pl ${ROOT}var/spool/cron/crontabs/root`" == "" ]; + then + einfo "adding to cron..." + echo "0 0 * * * ${ROOT}usr/sbin/logwatch.pl 2>&1 > /dev/null" \ + >> ${ROOT}var/spool/cron/crontabs/root + fi +} pkg_postrm() { - sed "/^0.*\/usr\/share\/logwatch\/scripts\/logwatch.*null$/d" ${ROOT}var/spool/cron/crontabs/root > ${ROOT}var/spool/cron/crontabs/root.new - mv --force ${ROOT}var/spool/cron/crontabs/root.new ${ROOT}var/spool/cron/crontabs/root + # this fixes a bug when logwatch package gets updated + if [ "`ls -d ${ROOT}var/db/pkg/sys-apps/logwatch* \ + | wc -l | tail -c 2`" -lt 2 ]; + then + sed "/^0.*\/usr\/sbin\/logwatch.*null$/d" \ + ${ROOT}var/spool/cron/crontabs/root \ + > ${ROOT}var/spool/cron/crontabs/root.new + mv --force ${ROOT}var/spool/cron/crontabs/root.new \ + ${ROOT}var/spool/cron/crontabs/root + fi } - diff --git a/sys-apps/logwatch/logwatch-4.3.1.ebuild b/sys-apps/logwatch/logwatch-4.3.1.ebuild index 03cda2ed0af4..8c1eb9f2caae 100644 --- a/sys-apps/logwatch/logwatch-4.3.1.ebuild +++ b/sys-apps/logwatch/logwatch-4.3.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/logwatch/logwatch-4.3.1.ebuild,v 1.4 2003/03/31 02:47:50 jhhudso Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/logwatch/logwatch-4.3.1.ebuild,v 1.5 2003/04/11 06:23:45 jhhudso Exp $ S=${WORKDIR}/${P} DESCRIPTION="LogWatch, a customizable log analysis system" @@ -16,6 +16,8 @@ DEPEND="virtual/glibc SLOT="0" KEYWORDS="~x86" LICENSE="as-is" +IUSE="" +RDEPEND="" src_install() { dodir /usr/share/logwatch @@ -30,17 +32,16 @@ src_install() { cat ${S}/scripts/logwatch.pl | sed -e "s/my \$BaseDir = \"\/etc\/log.d\";/my \$BaseDir = \"\/usr\/share\/logwatch\";/" > ${S}/scripts/logwatch.tmp_install exeinto /usr/share/logwatch/scripts newexe scripts/logwatch.tmp_install logwatch.pl - exeinto /usr/share/logwatch/scripts/logfiles for i in scripts/logfiles/* ; do if [ $(ls $i | wc -l) -ne 0 ] ; then file="`echo $i | awk -F/ '{ print $3 }'`" dodir /usr/share/logwatch/scripts/logfiles/$file - + exeinto /usr/share/logwatch/scripts/logfiles/$file for l in scripts/logfiles/$file/* ; do subfile="`echo $l | awk -F/ '{ print $4 }'`" - newexe $l $subfile + newexe $l $subfile done fi done @@ -62,9 +63,9 @@ src_install() { insinto /usr/share/logwatch/conf/logfiles for i in conf/logfiles/* ; do - doins $i + doins $i done - + insinto /usr/share/logwatch/conf/services for i in conf/services/* ; do doins $i @@ -81,12 +82,26 @@ pkg_postinst() { einfo "adding executable to path..." ln -sf ${ROOT}usr/share/logwatch/scripts/logwatch.pl ${ROOT}usr/bin/logwatch - einfo "adding to cron..." - echo "0 0 * * * ${ROOT}usr/share/logwatch/scripts/logwatch.pl 2>&1 > /dev/null" >> ${ROOT}var/spool/cron/crontabs/root - } + # this will avoid duplicate entries in the crontab + if [ "`grep logwatch.pl ${ROOT}var/spool/cron/crontabs/root`" == "" ]; + then + einfo "adding to cron..." + echo "0 0 * * * ${ROOT}usr/sbin/logwatch.pl 2>&1 > /dev/null" \ + >> ${ROOT}var/spool/cron/crontabs/root + fi +} pkg_postrm() { - sed "/^0.*\/usr\/share\/logwatch\/scripts\/logwatch.*null$/d" ${ROOT}var/spool/cron/crontabs/root > ${ROOT}var/spool/cron/crontabs/root.new - mv --force ${ROOT}var/spool/cron/crontabs/root.new ${ROOT}var/spool/cron/crontabs/root + # this fixes a bug when logwatch package gets updated + if [ "`ls -d ${ROOT}var/db/pkg/sys-apps/logwatch* \ + | wc -l | tail -c 2`" -lt 2 ]; + then + sed "/^0.*\/usr\/sbin\/logwatch.*null$/d" \ + ${ROOT}var/spool/cron/crontabs/root \ + > ${ROOT}var/spool/cron/crontabs/root.new + mv --force ${ROOT}var/spool/cron/crontabs/root.new \ + ${ROOT}var/spool/cron/crontabs/root + fi } + |