From nobody Mon Oct 03 15:51:02 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mh50Q3zZ7z4d3YS; Mon, 3 Oct 2022 15:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mh50Q30rHz3DjL; Mon, 3 Oct 2022 15:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664812262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WM5fETDlv1ilBvQ5hnkZ0eLrwCQk1lEQr0w61H4Xi+s=; b=i0FVqR9b8dexaag6KbN7UDEYdNa7d6ffwdSlUtG8YVIXDMx0lhnTUVmSNeegCNfgtErARj nAFdXY2eJr5JQk0yHqiHpge/93S4QUdFTeubyO8g+xeKjoh4PsaTYa4qLdcExzzznBJHyW VlhYnhkcUnNnLwbICT6pGaf5BQq2PRa6V+nt5VpNy2ssXOirkq6eNBrGkOPUmPVg6+2Hic EsECgyetV8+fFadfi/ePTAFhSYxTIh19gf9lrmvEfnX2bbc+1+TjRekKPdhovme1DCmIgQ YUZyMrPK56IXfa+dhDKsW8dlG5G7LxLdJTDn9DMRES8XHFWTt2ZqFaLNU63paA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mh50Q23wLzFwX; Mon, 3 Oct 2022 15:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 293Fp2wK006171; Mon, 3 Oct 2022 15:51:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 293Fp235006170; Mon, 3 Oct 2022 15:51:02 GMT (envelope-from git) Date: Mon, 3 Oct 2022 15:51:02 GMT Message-Id: <202210031551.293Fp235006170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: 03d66186f626 - main - bsdinstall: add hooks to allow for easier customizing the install List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03d66186f626736ca0467965ac456371e7bd0c9c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664812262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WM5fETDlv1ilBvQ5hnkZ0eLrwCQk1lEQr0w61H4Xi+s=; b=bZj0iZHVfSexfPOEiq2bg9OisylapLrlPBryCskS5tkW/Wmm1YadRGh1Fsa1IN7L+thCxg qpf9bIQquA1gDD+wAaSWvObIknW50s4z1k6nIj8td8RsrPtq/bvDkzUrYJQvukOjvUPMdy z/h6smB49LykLhjqzen+P98rf1/JY0vxRSsGoE/4AYVPXQWrNvFBPww7jbQqp/I2k/I80a uNKYoaMe0W+ij2XmKQS+A295z/BfCdYq3cx8KEgkkdWnHc9kXg2hQmXb8fhNNfhl2YpTn4 e5umBNaKk6sKPKw8LjBfbDC2Jg3f+jeVog/ipTcdkM6GQFuXQrDSWLwi/1DjQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664812262; a=rsa-sha256; cv=none; b=B1LKIcBx6UGor2dd56D8p2lhxwC5izBMjZ0fXnh5fd9EbGJ++cfhsHRncgv2rjXR7O8FH1 gpJftK1r0YG2xZ7Z2Pf/S5UcfVBq7LI6qeO00vwruOd19Og8JmPb4DIzDmLG7dS65UcJlH 4hgltC/fW+mZAbfFy+RiKgerPacSOzSgoT9IsyQeBm+gEeXWpbkeh+jwYcN9HZliZg75uh c2t5NAxRCHo6Pkuz834fPyW4XaBoA7+SeyzfcV/dyMJwG4IJqjJx68lBF65oIacKc4aTma EXR76lWIIhYprnS+DiFgEO3jiDNm5cLxHi06qhB8i9wtMzl7GuhpEpIpSorM0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=03d66186f626736ca0467965ac456371e7bd0c9c commit 03d66186f626736ca0467965ac456371e7bd0c9c Author: Brad Davis AuthorDate: 2022-10-03 15:49:31 +0000 Commit: Brad Davis CommitDate: 2022-10-03 15:50:42 +0000 bsdinstall: add hooks to allow for easier customizing the install Approved by: allanjude Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D36459 --- usr.sbin/bsdinstall/scripts/auto | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 553c51b82287..fa433c68a82a 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -146,6 +146,8 @@ f_dprintf "Began Installation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC +[ -f /usr/libexec/bsdinstall/local.pre-everything ] && f_dprintf "Running local.pre-everything" && sh /usr/libexec/bsdinstall/local.pre-everything "$BSDINSTALL_CHROOT" + trap true SIGINT # This section is optional [ -z "$BSDINSTALL_SKIP_KEYMAP" ] && bsdinstall keymap @@ -187,6 +189,8 @@ fi rm -f $PATH_FSTAB touch $PATH_FSTAB +[ -f /usr/libexec/bsdinstall/local.pre-partition ] && f_dprintf "Running local.pre-partition" && sh /usr/libexec/bsdinstall/local.pre-partition "$BSDINSTALL_CHROOT" + # # Try to detect known broken platforms and apply their workarounds # @@ -334,6 +338,8 @@ case "$PARTMODE" in ;; esac +[ -f /usr/libexec/bsdinstall/local.pre-fetch ] && f_dprintf "Running local.pre-fetch" && sh /usr/libexec/bsdinstall/local.pre-fetch "$BSDINSTALL_CHROOT" + if [ -n "$FETCH_DISTRIBUTIONS" ]; then exec 3>&1 export BSDINSTALL_DISTDIR=$(`dirname $0`/fetchmissingdists 2>&1 1>&3) @@ -348,6 +354,8 @@ bsdinstall distextract || error "Distribution extract failed" # Set up boot loader bsdinstall bootconfig || error "Failed to configure bootloader" +[ -f /usr/libexec/bsdinstall/local.pre-configure ] && f_dprintf "Running local.pre-configure" && sh /usr/libexec/bsdinstall/local.pre-configure "$BSDINSTALL_CHROOT" + bsdinstall rootpass || error "Could not set root password" trap true SIGINT # This section is optional @@ -425,6 +433,8 @@ if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then rm -rf "$BSDINSTALL_FETCHDEST" fi +[ -f /usr/libexec/bsdinstall/local.post-configure ] && f_dprintf "Running local.post-configure" && sh /usr/libexec/bsdinstall/local.post-configure "$BSDINSTALL_CHROOT" + if [ -z "$BSDINSTALL_SKIP_MANUAL" ]; then dialog --backtitle "$OSNAME Installer" --title "Manual Configuration" \ --default-button no --yesno \