aboutsummaryrefslogtreecommitdiff
path: root/init.d/bootmisc.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-21 14:01:57 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-21 14:04:28 -0500
commitee944553a9ea35622046bd1ab5657fd416a7019a (patch)
tree329c340795740a2b42c95c1d40a32b8184d54080 /init.d/bootmisc.in
parent6cae41a4e63510cdcf3af1153d6e8300435e1838 (diff)
bootmisc: optionally save the previous dmesg log
X-Gentoo-Bug: 561204 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561204
Diffstat (limited to 'init.d/bootmisc.in')
-rw-r--r--init.d/bootmisc.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index 1a05920b..4015d8fe 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
;;