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 222607 2011-06-02 13:57:49Z 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_unionfs "$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 "Shell" "Open a shell in the new system" \
170 "Exit" "Apply configuration and exit installer" 2>&1 1>&3)
171 exec 3>&-
172
173 case "$REVISIT" in
174 "Add User")
175 bsdinstall adduser
176 finalconfig
--- 13 unchanged lines hidden (view full) ---
190 "Services")
191 bsdinstall services
192 finalconfig
193 ;;
194 "Time Zone")
195 bsdinstall time
196 finalconfig
197 ;;
198 "Shell")
199 clear
200 echo This shell is operating in a chroot in the new system. \
201 When finished making configuration changes, type \"exit\".
202 chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1
203 # Don't hose local rc.conf changes
204 cp $BSDINSTALL_CHROOT/etc/rc.conf $BSDINSTALL_TMPETC/rc.conf.manual
205 finalconfig
--- 18 unchanged lines hidden ---
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 222607 2011-06-02 13:57:49Z 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_unionfs "$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 "Shell" "Open a shell in the new system" \
170 "Exit" "Apply configuration and exit installer" 2>&1 1>&3)
171 exec 3>&-
172
173 case "$REVISIT" in
174 "Add User")
175 bsdinstall adduser
176 finalconfig
--- 13 unchanged lines hidden (view full) ---
190 "Services")
191 bsdinstall services
192 finalconfig
193 ;;
194 "Time Zone")
195 bsdinstall time
196 finalconfig
197 ;;
198 "Shell")
199 clear
200 echo This shell is operating in a chroot in the new system. \
201 When finished making configuration changes, type \"exit\".
202 chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1
203 # Don't hose local rc.conf changes
204 cp $BSDINSTALL_CHROOT/etc/rc.conf $BSDINSTALL_TMPETC/rc.conf.manual
205 finalconfig
--- 18 unchanged lines hidden ---