Page MenuHomeFreeBSD

bsdinstall: Ensure logging retained when BSDINSTALL_LOG is not changed by preamble
ClosedPublic

Authored by stevek on Jun 18 2020, 4:29 PM.
Tags
None
Referenced Files
F167488722: D25343.diff
Sat, Aug 22, 5:16 AM
Unknown Object (File)
Wed, Aug 19, 5:27 AM
Unknown Object (File)
Sun, Aug 16, 2:41 AM
Unknown Object (File)
Sat, Aug 15, 1:52 PM
Unknown Object (File)
Fri, Aug 14, 11:35 PM
Unknown Object (File)
Fri, Aug 14, 12:47 PM
Unknown Object (File)
Wed, Aug 12, 7:43 PM
Unknown Object (File)
Mon, Aug 10, 6:37 AM
Subscribers

Details

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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

This revision is now accepted and ready to land.Sat, Aug 22, 5:27 AM
dteske retitled this revision from Ensure logging retained when BSDINSTALL_LOG is not changed by preamble to bsdinstall: Ensure logging retained when BSDINSTALL_LOG is not changed by preamble.Sat, Aug 22, 5:29 AM