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:
parent
6cae41a4e6
commit
ee944553a9
@ -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
|
||||
|
@ -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
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user