Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jan 2011 01:05:21 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r216863 - in user/nwhitehorn/bsdinstall: libexec scripts
Message-ID:  <201101010105.p0115L3A093946@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101010105.p0115L3A093946>