Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: conf.d/, init.d/
Date: Thu, 29 Oct 2015 16:36:29
Message-Id: 1445454268.ee944553a9ea35622046bd1ab5657fd416a7019a.williamh@OpenRC
1 commit: ee944553a9ea35622046bd1ab5657fd416a7019a
2 Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
3 AuthorDate: Wed Oct 21 19:01:57 2015 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 21 19:04:28 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=ee944553
7
8 bootmisc: optionally save the previous dmesg log
9
10 X-Gentoo-Bug: 561204
11 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561204
12
13 conf.d/bootmisc | 5 +++++
14 init.d/bootmisc.in | 3 +++
15 2 files changed, 8 insertions(+)
16
17 diff --git a/conf.d/bootmisc b/conf.d/bootmisc
18 index d79706c..5371209 100644
19 --- a/conf.d/bootmisc
20 +++ b/conf.d/bootmisc
21 @@ -8,3 +8,8 @@ wipe_tmp="YES"
22 # Write the initial dmesg log into /var/log/dmesg after boot
23 # This may be useful if you need the kernel boot log afterwards
24 log_dmesg="YES"
25 +
26 +# Save the previous dmesg log to dmesc.old
27 +# This may be useful if you need to compare the current boot to the
28 +# previous one.
29 +#previous_dmesg=no
30
31 diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
32 index 1a05920..4015d8f 100644
33 --- a/init.d/bootmisc.in
34 +++ b/init.d/bootmisc.in
35 @@ -216,6 +216,9 @@ start()
36 case "$RC_SYS" in
37 VSERVER|OPENVZ|LXC|SYSTEMD-NSPAWN) ;;
38 *)
39 + if yesno ${previous_dmesg:-no}; then
40 + mv /var/log/dmesg /var/log/dmesg.old
41 + fi
42 dmesg > /var/log/dmesg
43 chmod 640 /var/log/dmesg
44 ;;