From owner-svn-src-user@FreeBSD.ORG Sat Jan 1 01:05:21 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 64031106566C; Sat, 1 Jan 2011 01:05:21 +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 5341E8FC0A; Sat, 1 Jan 2011 01:05:21 +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 p0115L08093953; Sat, 1 Jan 2011 01:05:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0115L3A093946; Sat, 1 Jan 2011 01:05:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201101010105.p0115L3A093946@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 1 Jan 2011 01:05:21 +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: r216863 - in user/nwhitehorn/bsdinstall: libexec 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: Sat, 01 Jan 2011 01:05:21 -0000 Author: nwhitehorn Date: Sat Jan 1 01:05:21 2011 New Revision: 216863 URL: http://svn.freebsd.org/changeset/base/216863 Log: Provide a little more functionality for the installed system, by allowing setting the root password, configuring user accounts, turning on ssh, etc. Added: user/nwhitehorn/bsdinstall/libexec/adduser (contents, props changed) user/nwhitehorn/bsdinstall/libexec/rootpass (contents, props changed) user/nwhitehorn/bsdinstall/scripts/adduser (contents, props changed) user/nwhitehorn/bsdinstall/scripts/rootpass (contents, props changed) Modified: user/nwhitehorn/bsdinstall/scripts/auto user/nwhitehorn/bsdinstall/scripts/config Added: user/nwhitehorn/bsdinstall/libexec/adduser ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/nwhitehorn/bsdinstall/libexec/adduser Sat Jan 1 01:05:21 2011 (r216863) @@ -0,0 +1 @@ +link ../scripts/adduser \ No newline at end of file Added: user/nwhitehorn/bsdinstall/libexec/rootpass ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/nwhitehorn/bsdinstall/libexec/rootpass Sat Jan 1 01:05:21 2011 (r216863) @@ -0,0 +1 @@ +link ../scripts/rootpass \ No newline at end of file Added: user/nwhitehorn/bsdinstall/scripts/adduser ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/nwhitehorn/bsdinstall/scripts/adduser Sat Jan 1 01:05:21 2011 (r216863) @@ -0,0 +1,13 @@ +#!/bin/sh + +cdialog --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 Modified: user/nwhitehorn/bsdinstall/scripts/auto ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/auto Sat Jan 1 00:20:14 2011 (r216862) +++ user/nwhitehorn/bsdinstall/scripts/auto Sat Jan 1 01:05:21 2011 (r216863) @@ -4,6 +4,7 @@ echo "Begun Installation at $(date)" > $ cdialog --backtitle "FreeBSD Installer" --title "Welcome" --msgbox "Welcome to the FreeBSD Installer." 0 0 +rm /tmp/rc.conf bsdinstall hostname FETCH_DISTRIBUTIONS="" @@ -19,7 +20,6 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then fi rm $PATH_FSTAB -rm /tmp/rc.conf bsdinstall partedit bsdinstall mount @@ -31,8 +31,9 @@ if [ ! -z $FETCH_DISTRIBUTIONS ]; then fi bsdinstall distextract +bsdinstall rootpass +bsdinstall adduser bsdinstall config -#bsdinstall rootpass cdialog --backtitle "FreeBSD Installer" --title "Welcome" --msgbox "Installation of FreeBSD complete!" 0 0 Modified: user/nwhitehorn/bsdinstall/scripts/config ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/config Sat Jan 1 00:20:14 2011 (r216862) +++ user/nwhitehorn/bsdinstall/scripts/config Sat Jan 1 01:05:21 2011 (r216863) @@ -1,5 +1,20 @@ #!/bin/sh +exec 3>&1 +DAEMONS=$(cdialog --backtitle "FreeBSD Installer" \ + --title "System Configuration" --nocancel --separate-output \ + --checklist "Choose the services you would like to be started at boot:" \ + 0 0 0 \ + sshd "Secure shell daemon" on \ + ntpd "Synchronize system and network time" off \ + powerd "Adjust CPU frequency dynamically" off \ +2>&1 1>&3) +exec 3>&- + +for daemon in $DAEMONS; do + echo ${daemon}_enable=\"YES\" >> /tmp/rc.conf +done + cp $PATH_FSTAB $BSDINSTALL_CHROOT/etc/fstab cp /tmp/rc.conf $BSDINSTALL_CHROOT/etc/rc.conf cp /tmp/resolv.conf $BSDINSTALL_CHROOT/etc/resolv.conf Added: user/nwhitehorn/bsdinstall/scripts/rootpass ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/nwhitehorn/bsdinstall/scripts/rootpass Sat Jan 1 01:05:21 2011 (r216863) @@ -0,0 +1,11 @@ +#!/bin/sh + +clear +echo "FreeBSD Installer" +echo "========================" +echo + +echo "Please select a password for the system management account (root):" + +chroot $BSDINSTALL_CHROOT passwd root +