From nobody Tue Aug 16 21:15:17 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 4M6kSk0FMRz4ZSbm; Tue, 16 Aug 2022 21:15:18 +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 4M6kSj6rX5z3jCt; Tue, 16 Aug 2022 21:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660684518; 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=9dougPGi0WjBdqGQeL/6G3E8agvlxdz9MxSCYqPf968=; b=uxWCdNNoewR/JkTaDUNAdP5Kw5bTkju1E2iz8tG6sH+j5I9o16cYYUeKcFfM82JmQ9xf08 7DT3/tr4KVO5n3wk4HmtYt9SXeR0t4V88CUFXp/ZZIndrkROGAejVamT9lPIuM9s0lzjpH NADJNeh9uKlX6vQjoZT3gjlqVfcJJpx9eQpp6MgZVCc+af6rOIqQp3BmedGticqfqh+LJs y22iuBAP1cM9OuSkHJReSw4ggZ32IRdLDuPS/O4XKBxrwvcHb2dzDDWX9LAhjYSf206igg +Pyiu7sz9yx6Qw4sWUUuF3iRZrPz1qt1IYjtsMPKvjtdZ/sNhNZD5Y9xVtxGTA== 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 4M6kSj5nbLzPRV; Tue, 16 Aug 2022 21:15:17 +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 27GLFHd0072024; Tue, 16 Aug 2022 21:15:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27GLFH3V072023; Tue, 16 Aug 2022 21:15:17 GMT (envelope-from git) Date: Tue, 16 Aug 2022 21:15:17 GMT Message-Id: <202208162115.27GLFH3V072023@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: 17f4ded55180 - main - bsdinstall: add variables to allow skipping over some phases of 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: 17f4ded55180e1023b9023493c3f215c3a47a445 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660684518; 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=9dougPGi0WjBdqGQeL/6G3E8agvlxdz9MxSCYqPf968=; b=VC6OFXpTdXzuiQdz/SSqK9hbGGbEf2nRe4mzAVAaenwLsjt48jcFzaitYZyqmtckJZA+E1 XoS/ckSb1jqnDGfiuNfP0QRsWqve7+WRyy8/vAz7OlE3LoZiYamlf2QTmvl0ZIdUiP9R/O aaGknNtiDAbu+iVHsoNENq+aq8QzNpDkqae04oKIHlfZC/+SU4Pcf+O7lG/w4zgbUGHYzx CbfocRKr4aSVj3QgU2A8WnYuKinqC65kbOhqrwK3WG1P4GK9cANLPq/Qep4IaKFRqivPHP CwtRSTD1CyN1Az1Okg+iT4oQQDUpZFmU7gGRsmQtDiF0LmbaFpVoDN+b8aC2SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660684518; a=rsa-sha256; cv=none; b=VRYowCAgVMhuOGI2Mwo6oMTsGMXe/rHbw/9/cbHV0IdJQRw802p9WXVBngAtKUuLFV3N8h wiIRXYUNj16fxscGtAFQM+kzmoIckLNfIJfaU2ve/t3BG3DkLItKVq0B6peRVDFE1YGGpQ sSxuWkRKGfMHP497ZRODxXaXHWrLo3tsgd85K07y09fhyudH18Pqwshya795N8//ncp0Eo 3FTwiXgv+BqoxEK76k7DjaHRbHKhhCCxI6WQENi0TlYZFtxuIvjIoeztMzNf0U7mQKD6dd Pfmrihy+mJ0DtKlw5ncv4DWIDDUjL+VvAdZoUJtx9s42VS17ralxyT40rnkfgw== 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=17f4ded55180e1023b9023493c3f215c3a47a445 commit 17f4ded55180e1023b9023493c3f215c3a47a445 Author: Brad Davis AuthorDate: 2022-08-16 21:11:44 +0000 Commit: Brad Davis CommitDate: 2022-08-16 21:11:44 +0000 bsdinstall: add variables to allow skipping over some phases of the install Reviewed by: allanjude, dteske Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D35357 --- usr.sbin/bsdinstall/scripts/auto | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 7d5396d15c01..553c51b82287 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -147,10 +147,10 @@ rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC trap true SIGINT # This section is optional -bsdinstall keymap +[ -z "$BSDINSTALL_SKIP_KEYMAP" ] && bsdinstall keymap trap error SIGINT # Catch cntrl-C here -bsdinstall hostname || error "Set hostname failed" +if [ -z "$BSDINSTALL_SKIP_HOSTNAME" ]; then bsdinstall hostname || error "Set hostname failed"; fi export DISTRIBUTIONS="${DISTRIBUTIONS:-base.txz kernel.txz}" if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then @@ -354,11 +354,12 @@ trap true SIGINT # This section is optional if [ "$NETCONFIG_DONE" != yes ]; then bsdinstall netconfig # Don't check for errors -- the user may cancel fi -bsdinstall time -bsdinstall services -bsdinstall hardening +[ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time +[ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services +[ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening -dialog --backtitle "$OSNAME Installer" --title "Add User Accounts" --yesno \ +[ -z "$BSDINSTALL_SKIP_USERS" ] && dialog --backtitle "$OSNAME Installer" \ + --title "Add User Accounts" --yesno \ "Would you like to add users to the installed system now?" 0 0 && \ bsdinstall adduser @@ -415,7 +416,7 @@ finalconfig() { } # Allow user to change his mind -finalconfig +[ -z "$BSDINSTALL_SKIP_FINALCONFIG" ] && finalconfig trap error SIGINT # SIGINT is bad again bsdinstall config || error "Failed to save config" @@ -424,14 +425,16 @@ if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then rm -rf "$BSDINSTALL_FETCHDEST" fi -dialog --backtitle "$OSNAME Installer" --title "Manual Configuration" \ - --default-button no --yesno \ - "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 -if [ $? -eq 0 ]; then - clear - echo This shell is operating in a chroot in the new system. \ - When finished making configuration changes, type \"exit\". - chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 +if [ -z "$BSDINSTALL_SKIP_MANUAL" ]; then + dialog --backtitle "$OSNAME Installer" --title "Manual Configuration" \ + --default-button no --yesno \ + "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 + if [ $? -eq 0 ]; then + clear + echo This shell is operating in a chroot in the new system. \ + When finished making configuration changes, type \"exit\". + chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 + fi fi bsdinstall entropy