Page MenuHomeFreeBSD

Ensure logging retained when BSDINSTALL_LOG is not changed by preamble
Needs ReviewPublic

Authored by stevek on Jun 18 2020, 4:29 PM.

Details

Reviewers
nwhitehorn
dteske
Summary

Before the preamble script is sourced, initialize BSDINSTALL_LOG with the
file in $debugFile, if it is not already set.

Without this change, the bsdinstall script would assume the preamble set
BSDINSTALL_LOG to empty and the comparison with $debugFile will fail,
causing the log to be re-initialized to /dev/null.

Test Plan

Found during use of scripted bsdinstall.
Without the change, all debug log output after the preamble is lost.
With the change, the log output is seen in the log file, as expected.
Setting BSDINSTALL_LOG in the preamble causes the bsdinstall script to
re-initialize the log to point to the appropriate place.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 31802
Build 29363: arc lint + arc unit

Event Timeline

Thank for submitting. Give me a chance to review, but I do believe this looks like a good candidate for commit. Thank you