1#!/bin/sh 2#- 3# Copyright (c) 2011 Nathan Whitehorn 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/usr.sbin/bsdinstall/scripts/auto 223897 2011-07-09 23:01:54Z nwhitehorn $ |
28 29echo "Begun Installation at $(date)" > $BSDINSTALL_LOG 30 31error() { 32 test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR 33 test -f $PATH_FSTAB && bsdinstall umount 34 dialog --backtitle "FreeBSD Installer" --title "Abort" \ 35 --no-label "Exit" --yes-label "Restart" --yesno \ --- 86 unchanged lines hidden (view full) --- 122 # Download to a directory in the new system as scratch space 123 BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/freebsd-dist" 124 mkdir -p "$BSDINSTALL_FETCHDEST" || error 125 126 export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS" 127 # Try to use any existing distfiles 128 if [ -d $BSDINSTALL_DISTDIR ]; then 129 DISTDIR_IS_UNIONFS=1 |
130 mount_nullfs -o union "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR" |
131 fi 132 133 # Otherwise, fetch everything 134 if [ $? -ne 0 ]; then 135 export DISTRIBUTIONS="$ALL_DISTRIBUTIONS" 136 export BSDINSTALL_DISTDIR="$BSDINSTALL_FETCHDEST" 137 fi 138 --- 22 unchanged lines hidden (view full) --- 161 --title "Final Configuration" --no-cancel --menu \ 162 "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 \ 163 "Add User" "Add a user to the system" \ 164 "Root Password" "Change root password" \ 165 "Hostname" "Set system hostname" \ 166 "Network" "Networking configuration" \ 167 "Services" "Set daemons to run on startup" \ 168 "Time Zone" "Set system timezone" \ |
169 "Handbook" "Install FreeBSD Handbook (requires network)" \ |
170 "Shell" "Open a shell in the new system" \ 171 "Exit" "Apply configuration and exit installer" 2>&1 1>&3) 172 exec 3>&- 173 174 case "$REVISIT" in 175 "Add User") 176 bsdinstall adduser 177 finalconfig --- 13 unchanged lines hidden (view full) --- 191 "Services") 192 bsdinstall services 193 finalconfig 194 ;; 195 "Time Zone") 196 bsdinstall time 197 finalconfig 198 ;; |
199 "Handbook") 200 bsdinstall docsinstall 201 finalconfig 202 ;; |
203 "Shell") 204 clear 205 echo This shell is operating in a chroot in the new system. \ 206 When finished making configuration changes, type \"exit\". 207 chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 208 # Don't hose local rc.conf changes 209 cp $BSDINSTALL_CHROOT/etc/rc.conf $BSDINSTALL_TMPETC/rc.conf.manual 210 finalconfig --- 18 unchanged lines hidden --- |