git: 70c9d0479900 - main - bsdinstall: Ensure logging retained when BSDINSTALL_LOG is not changed by preamble
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 22 Aug 2026 05:32:05 UTC
The branch main has been updated by dteske:
URL: https://cgit.FreeBSD.org/src/commit/?id=70c9d047990017394a872474c81fcdd66b502168
commit 70c9d047990017394a872474c81fcdd66b502168
Author: Stephen J. Kiernan <stevek@FreeBSD.org>
AuthorDate: 2026-08-22 05:29:37 +0000
Commit: Devin Teske <dteske@FreeBSD.org>
CommitDate: 2026-08-22 05:29:37 +0000
bsdinstall: Ensure logging retained when BSDINSTALL_LOG is not changed by preamble
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.
Reviewed by: dteske
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25343
---
usr.sbin/bsdinstall/scripts/script | 1 +
1 file changed, 1 insertion(+)
diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script
index 4c792d80df6a..6e4aae8f5890 100755
--- a/usr.sbin/bsdinstall/scripts/script
+++ b/usr.sbin/bsdinstall/scripts/script
@@ -98,6 +98,7 @@ awk 'BEGIN {pathb=ARGV[2]; ARGV[2]=""} /^#!/{b=1} {
"$SCRIPT" $TMPDIR/bsdinstall-installscript-setup \
>$TMPDIR/bsdinstall-installscript-preamble
+: ${BSDINSTALL_LOG="${debugFile#+}"}
. $TMPDIR/bsdinstall-installscript-preamble
export BSDINSTALL_DISTDIR