summaryrefslogtreecommitdiff
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
authorOvidiu Vancea <ovidiu.vancea@ni.com>2016-08-12 18:04:12 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-23 17:44:05 +0100
commit277a5975d43125623b5a51ddcb48f9ee2474d0fc (patch)
treedaefdf03531600d3546ae48164227422351e2d86 /meta/recipes-core/initscripts
parent1a62ffd108e6aa7b7e5d0a81819550e8a7afeb60 (diff)
downloadopenembedded-core-277a5975d43125623b5a51ddcb48f9ee2474d0fc.tar.gz
openembedded-core-277a5975d43125623b5a51ddcb48f9ee2474d0fc.tar.bz2
openembedded-core-277a5975d43125623b5a51ddcb48f9ee2474d0fc.zip
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 <ovidiu.vancea@ni.com> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rwxr-xr-x[-rw-r--r--]meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh b/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh
index a97b0681e1..2b9eba64cf 100644..100755
--- 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