aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'init.d')
-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
;;