bootmisc: optionally save the previous dmesg log

X-Gentoo-Bug: 561204
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561204
This commit is contained in:
William Hubbs
2015-10-21 14:01:57 -05:00
parent 6cae41a4e6
commit ee944553a9
2 changed files with 8 additions and 0 deletions

View File

@@ -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
;;