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 (From OE-Core rev: 277a5975d43125623b5a51ddcb48f9ee2474d0fc) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
4945cdfd76
commit
0d445840c4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue