mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

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>
18 lines
352 B
Bash
Executable File
18 lines
352 B
Bash
Executable File
#!/bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: dmesg
|
|
# Required-Start:
|
|
# Required-Stop:
|
|
# Default-Start: S
|
|
# Default-Stop:
|
|
### END INIT INFO
|
|
|
|
if [ -f /var/log/dmesg ]; then
|
|
if LOGPATH=$(which logrotate); then
|
|
$LOGPATH -f /etc/logrotate-dmesg.conf
|
|
else
|
|
mv -f /var/log/dmesg /var/log/dmesg.old
|
|
fi
|
|
fi
|
|
dmesg -s 131072 > /var/log/dmesg
|