From 277a5975d43125623b5a51ddcb48f9ee2474d0fc Mon Sep 17 00:00:00 2001 From: Ovidiu Vancea Date: Fri, 12 Aug 2016 18:04:12 +0300 Subject: initscripts: Check for logrotate in dmesg.sh Autodetect previously hardcoded logrotate location because it can be installed in multiple places like /usr/bin/logrotate which is very common besides /usr/sbin Signed-off-by: Ovidiu Vancea Signed-off-by: Ioan-Adrian Ratiu Signed-off-by: Ross Burton --- meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh (limited to 'meta/recipes-core/initscripts') diff --git a/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh b/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh old mode 100644 new mode 100755 index a97b0681e1..2b9eba64cf --- a/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh @@ -8,8 +8,8 @@ ### END INIT INFO if [ -f /var/log/dmesg ]; then - if [ -f /usr/sbin/logrotate ]; then - logrotate -f /etc/logrotate-dmesg.conf + if LOGPATH=$(which logrotate); then + $LOGPATH -f /etc/logrotate-dmesg.conf else mv -f /var/log/dmesg /var/log/dmesg.old fi -- cgit v1.2.3