git: 70c9d0479900 - main - bsdinstall: Ensure logging retained when BSDINSTALL_LOG is not changed by preamble

Devin Teske <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a893455.1d680.62f622a2__16868.5028374725$1787376801$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by dteske:

URL: https://cgit.FreeBSD.org/src/commit/?id=70c9d047990017394a872474c81fcdd66b502168

commit 70c9d047990017394a872474c81fcdd66b502168
Author:     Stephen J. Kiernan <[email protected]>
AuthorDate: 2026-08-22 05:29:37 +0000
Commit:     Devin Teske <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.