From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2C49013888F for ; Thu, 29 Oct 2015 16:36:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B4DE9E0804; Thu, 29 Oct 2015 16:36:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 58D89E0804 for ; Thu, 29 Oct 2015 16:36:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 87FC5340B35 for ; Thu, 29 Oct 2015 16:36:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7015E1A0B for ; Thu, 29 Oct 2015 16:36:25 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1445454268.ee944553a9ea35622046bd1ab5657fd416a7019a.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: conf.d/, init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: conf.d/bootmisc init.d/bootmisc.in X-VCS-Directories: conf.d/ init.d/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: ee944553a9ea35622046bd1ab5657fd416a7019a X-VCS-Branch: master Date: Thu, 29 Oct 2015 16:36:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 71bacbdf-5978-436a-af64-c4ae41c30302 X-Archives-Hash: 2c9ad4938ddfeb8357db4eddb479b1bf commit: ee944553a9ea35622046bd1ab5657fd416a7019a Author: William Hubbs gmail com> AuthorDate: Wed Oct 21 19:01:57 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed Oct 21 19:04:28 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=ee944553 bootmisc: optionally save the previous dmesg log X-Gentoo-Bug: 561204 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561204 conf.d/bootmisc | 5 +++++ init.d/bootmisc.in | 3 +++ 2 files changed, 8 insertions(+) diff --git a/conf.d/bootmisc b/conf.d/bootmisc index d79706c..5371209 100644 --- a/conf.d/bootmisc +++ b/conf.d/bootmisc @@ -8,3 +8,8 @@ wipe_tmp="YES" # Write the initial dmesg log into /var/log/dmesg after boot # This may be useful if you need the kernel boot log afterwards log_dmesg="YES" + +# Save the previous dmesg log to dmesc.old +# This may be useful if you need to compare the current boot to the +# previous one. +#previous_dmesg=no diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index 1a05920..4015d8f 100644 --- a/init.d/bootmisc.in +++ b/init.d/bootmisc.in @@ -216,6 +216,9 @@ start() case "$RC_SYS" in VSERVER|OPENVZ|LXC|SYSTEMD-NSPAWN) ;; *) + if yesno ${previous_dmesg:-no}; then + mv /var/log/dmesg /var/log/dmesg.old + fi dmesg > /var/log/dmesg chmod 640 /var/log/dmesg ;;