Deleted Added
full compact
auto (256338) auto (256343)
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#
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 256338 2013-10-11 20:21:44Z des $
27# $FreeBSD: head/usr.sbin/bsdinstall/scripts/auto 256343 2013-10-11 20:41:35Z dteske $
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 \

--- 52 unchanged lines hidden (view full) ---

88 exec 3>&-
89 test $MIRROR_BUTTON -eq 0 || error
90 export BSDINSTALL_DISTSITE
91fi
92
93rm $PATH_FSTAB
94touch $PATH_FSTAB
95
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 \

--- 52 unchanged lines hidden (view full) ---

88 exec 3>&-
89 test $MIRROR_BUTTON -eq 0 || error
90 export BSDINSTALL_DISTSITE
91fi
92
93rm $PATH_FSTAB
94touch $PATH_FSTAB
95
96dialog --backtitle "FreeBSD Installer" --title "Partitioning" --extra-button \
97 --extra-label "Manual" --ok-label "Guided" --cancel-label "Shell" \
98 --yesno "Would you like to use the guided partitioning tool (recommended for beginners) or to set up partitions manually (experts)? You can also open a shell and set up partitions entirely by hand." 0 0
96PMODES="\
97Guided \"Partitioning Tool (Recommended for Beginners)\" \
98Manual \"Manually Configure Partitions (Expert)\" \
99Shell \"Open a shell and partition by hand\""
99
100
100case $? in
1010) # Guided
101CURARCH=$( uname -m )
102case $CURARCH in
103 amd64|i386) # Booting ZFS Supported
104 PMODES="$PMODES ZFS \"Automatic Root-on-ZFS (Experimental)\""
105 ;;
106 *) # Booting ZFS Unspported
107 ;;
108esac
109
110exec 3>&1
111PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \
112 --title "Partitioning" \
113 --menu "How would you like to partition your disk?" \
114 0 0 0 2>&1 1>&3`
115if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi
116exec 3>&-
117
118case "$PARTMODE" in
119"Guided") # Guided
102 bsdinstall autopart || error
103 bsdinstall mount || error
104 ;;
120 bsdinstall autopart || error
121 bsdinstall mount || error
122 ;;
1051) # Shell
123"Shell") # Shell
106 clear
107 echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'."
108 sh 2>&1
109 ;;
124 clear
125 echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'."
126 sh 2>&1
127 ;;
1103) # Manual
128"Manual") # Manual
111 bsdinstall partedit || error
112 bsdinstall mount || error
113 ;;
129 bsdinstall partedit || error
130 bsdinstall mount || error
131 ;;
132"ZFS") # ZFS
133 bsdinstall zfsboot || error
134 bsdinstall mount || error
135 ;;
114*)
115 error
116 ;;
117esac
118
119if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
120 ALL_DISTRIBUTIONS="$DISTRIBUTIONS"
121

--- 108 unchanged lines hidden ---
136*)
137 error
138 ;;
139esac
140
141if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
142 ALL_DISTRIBUTIONS="$DISTRIBUTIONS"
143

--- 108 unchanged lines hidden ---