[oe-commits] Jesse Gilles : logrotate: fix /etc/crontab entry -- run as root

git version control git at git.openembedded.org
Sat Jan 22 17:29:52 UTC 2011


Module: openembedded.git
Branch: master
Commit: 03069201ee60f6e3257dd24fa6c5e1627d083df3
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=03069201ee60f6e3257dd24fa6c5e1627d083df3

Author: Jesse Gilles <jgilles at multitech.com>
Date:   Thu Jan 20 03:13:13 2011 +0000

logrotate: fix /etc/crontab entry -- run as root

* /etc/crontab entry was missing username field, so it never ran

Signed-off-by: Jesse Gilles <jgilles at multitech.com>
Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 recipes/logrotate/logrotate_3.7.1.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes/logrotate/logrotate_3.7.1.bb b/recipes/logrotate/logrotate_3.7.1.bb
index 850d76a..c084dcc 100644
--- a/recipes/logrotate/logrotate_3.7.1.bb
+++ b/recipes/logrotate/logrotate_3.7.1.bb
@@ -5,7 +5,7 @@ DEPENDS = "popt"
 RDEPENDS_${PN} = "cron"
 SECTION = "admin"
 LICENSE = "GPL"
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "http://ftp.debian.org/debian/pool/main/l/logrotate/logrotate_${PV}.orig.tar.gz \
 	   file://logrotate-3.7.1.patch \
@@ -28,7 +28,7 @@ do_install () {
 
 pkg_postinst () {
     # Add the logrotate line to /etc/crontab
-    grep -q "${base_sbindir}/logrotate" ${sysconfdir}/crontab || echo "*/5 * * * *   ${base_sbindir}/logrotate ${sysconfdir}/logrotate.conf" >> ${sysconfdir}/crontab
+    grep -q "${base_sbindir}/logrotate" ${sysconfdir}/crontab || echo "*/5 * * * * root ${base_sbindir}/logrotate ${sysconfdir}/logrotate.conf" >> ${sysconfdir}/crontab
 }
 
 pkg_postrm() {





More information about the Openembedded-commits mailing list