diff options
author | Dermot Bradley <dermot_bradley@yahoo.com> | 2022-01-29 21:01:20 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gmail.com> | 2022-01-30 01:53:10 -0500 |
commit | 98feac173e4e60a3f1fd45f332a5a92e06315ca4 (patch) | |
tree | 656da3e4fd8170bbc031718b154e6f93f1ae4e90 | |
parent | e6d48ea1417b7ddab0f16297b6f595ad161e0a80 (diff) |
init.d/bootmisc.in: prevent error due to nonexistant file
During boot if the "previous_dmesg" setting is enabled in
/etc/conf.d/bootmisc then during the 1st boot of a machine the
bootmisc init.d script will attempt to move a nonexistant dmesg
file, so generating an error on the console.
Modify the script to only move an existing file.
-rw-r--r-- | init.d/bootmisc.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in index 4a2e7f02..233dfc55 100644 --- a/init.d/bootmisc.in +++ b/init.d/bootmisc.in @@ -226,7 +226,7 @@ start() case "$RC_SYS" in VSERVER|OPENVZ|LXC|SYSTEMD-NSPAWN) ;; *) - if yesno ${previous_dmesg:-no}; then + if yesno ${previous_dmesg:-no} && [ -e /var/log/dmesg ]; then mv /var/log/dmesg /var/log/dmesg.old fi dmesg > /var/log/dmesg |