diff options
author | Brad Davis <brd@FreeBSD.org> | 2022-08-16 21:11:44 +0000 |
---|---|---|
committer | Brad Davis <brd@FreeBSD.org> | 2022-08-16 21:11:44 +0000 |
commit | 17f4ded55180e1023b9023493c3f215c3a47a445 (patch) | |
tree | c098e5fb8314dc87f8687fa2849809b2bb9bf7fe /usr.sbin/bsdinstall | |
parent | fbafa98a94cc7f4f30d71003c230d1b5d4c5960b (diff) | |
download | src-17f4ded55180e1023b9023493c3f215c3a47a445.tar.gz src-17f4ded55180e1023b9023493c3f215c3a47a445.zip |
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
Diffstat (limited to 'usr.sbin/bsdinstall')
-rwxr-xr-x | usr.sbin/bsdinstall/scripts/auto | 33 |
1 files 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 |