1#!/bin/sh 2# 3# SPDX-License-Identifier: GPL-2.0-only 4# 5 6### BEGIN INIT INFO 7# Provides: dmesg 8# Required-Start: 9# Required-Stop: 10# Default-Start: S 11# Default-Stop: 12### END INIT INFO 13 14if [ -f /var/log/dmesg ]; then 15 if LOGPATH=$(which logrotate); then 16 $LOGPATH -f /etc/logrotate-dmesg.conf 17 else 18 mv -f /var/log/dmesg /var/log/dmesg.old 19 fi 20fi 21dmesg -s 131072 > /var/log/dmesg 22