From owner-svn-src-user@FreeBSD.ORG Fri Jan 28 15:25:47 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 483671065672; Fri, 28 Jan 2011 15:25:47 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 385068FC15; Fri, 28 Jan 2011 15:25:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0SFPk1Z084755; Fri, 28 Jan 2011 15:25:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0SFPk1k084751; Fri, 28 Jan 2011 15:25:46 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201101281525.p0SFPk1k084751@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 28 Jan 2011 15:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218018 - user/nwhitehorn/bsdinstall/scripts X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2011 15:25:47 -0000 Author: nwhitehorn Date: Fri Jan 28 15:25:46 2011 New Revision: 218018 URL: http://svn.freebsd.org/changeset/base/218018 Log: Allow use to revisit configuration choices and have a chroot shell in their shiny new system before rebooting. Modified: user/nwhitehorn/bsdinstall/scripts/adduser user/nwhitehorn/bsdinstall/scripts/auto user/nwhitehorn/bsdinstall/scripts/jail Modified: user/nwhitehorn/bsdinstall/scripts/adduser ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/adduser Fri Jan 28 14:47:09 2011 (r218017) +++ user/nwhitehorn/bsdinstall/scripts/adduser Fri Jan 28 15:25:46 2011 (r218018) @@ -1,13 +1,8 @@ #!/bin/sh -dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ - "Would you like to add users to the installed system now?" 0 0 - -if [ $? -eq 0 ]; then - clear - echo "FreeBSD Installer" - echo "========================" - echo "Add Users" - echo - chroot $BSDINSTALL_CHROOT adduser -fi +clear +echo "FreeBSD Installer" +echo "========================" +echo "Add Users" +echo +chroot $BSDINSTALL_CHROOT adduser Modified: user/nwhitehorn/bsdinstall/scripts/auto ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/auto Fri Jan 28 14:47:09 2011 (r218017) +++ user/nwhitehorn/bsdinstall/scripts/auto Fri Jan 28 15:25:46 2011 (r218018) @@ -93,7 +93,67 @@ if [ "$NETCONFIG_DONE" != yes ]; then fi bsdinstall time bsdinstall services -bsdinstall adduser + +dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ + "Would you like to add users to the installed system now?" 0 0 && \ + bsdinstall adduser + +finalconfig() { + exec 3>&1 + REVISIT=$(dialog --backtitle "FreeBSD Installer" \ + --title "Final Configuration" --no-cancel --menu \ + "Setup of your FreeBSD system is nearly complete. You can now \ + modify your configuration choices or apply more complex changes \ + using a shell." 0 0 0 \ + "Add User" "Add a user to the system" \ + "Root Password" "Change root password" \ + "Hostname" "Set system hostname" \ + "Network" "Networking configuration" \ + "Services" "Set daemons to run on startup" \ + "Time Zone" "Set system timezone" \ + "Shell" "Open a shell in the new system" \ + "Reboot" "Apply configuration and reboot" 2>&1 1>&3) + exec 3>&- + + case "$REVISIT" in + "Add User") + bsdinstall adduser + finalconfig + ;; + "Root Password") + bsdinstall rootpass + finalconfig + ;; + "Hostname") + bsdinstall hostname + finalconfig + ;; + "Network") + bsdinstall netconfig + finalconfig + ;; + "Services") + bsdinstall services + finalconfig + ;; + "Time Zone") + bsdinstall time + finalconfig + ;; + "Shell") + 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 + # Don't hose local rc.conf changes + cp $BSDINSTALL_CHROOT/etc/rc.conf $BSDINSTALL_TMPETC/rc.conf.manual + finalconfig + ;; + esac +} + +# Allow user to change his mind +finalconfig trap error SIGINT # SIGINT is bad again bsdinstall config || error Modified: user/nwhitehorn/bsdinstall/scripts/jail ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/jail Fri Jan 28 14:47:09 2011 (r218017) +++ user/nwhitehorn/bsdinstall/scripts/jail Fri Jan 28 15:25:46 2011 (r218018) @@ -43,7 +43,10 @@ bsdinstall rootpass || error trap true SIGINT # This section is optional bsdinstall time bsdinstall services -bsdinstall adduser + +dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ + "Would you like to add users to the installed system now?" 0 0 && \ + bsdinstall adduser trap error SIGINT # SIGINT is bad again bsdinstall config || error