socsvn commit: r272574 - soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts
kczekirda at FreeBSD.org
kczekirda at FreeBSD.org
Sun Aug 17 21:36:23 UTC 2014
Author: kczekirda
Date: Sun Aug 17 21:36:22 2014
New Revision: 272574
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272574
Log:
disk selection TOFILE
Modified:
soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/auto
Modified: soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/auto
==============================================================================
--- soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/auto Sun Aug 17 21:36:17 2014 (r272573)
+++ soc2014/kczekirda/pxe-fai-head/head/usr.sbin/bsdinstall/scripts/auto Sun Aug 17 21:36:22 2014 (r272574)
@@ -31,6 +31,8 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/device.subr
############################################################ FUNCTIONS
@@ -85,7 +87,7 @@
done
FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space
-if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" -z "$TOFILE" ]; then
+if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" -a -z "$TOFILE" ]; then
dialog --backtitle "FreeBSD Installer" --title "Network Installation" --msgbox "No installation files were found on the boot volume. The next few screens will allow you to configure networking so that they can be downloaded from the Internet." 0 0
bsdinstall netconfig || error
NETCONFIG_DONE=yes
@@ -110,6 +112,11 @@
Manual \"Manually Configure Partitions (Expert)\" \
Shell \"Open a shell and partition by hand\""
+if [ ! -z "$TOFILE" ]; then
+ PMODES="\
+ Classic \"Choose disk for installation\""
+fi
+
CURARCH=$( uname -m )
case $CURARCH in
amd64|i386) # Booting ZFS Supported
@@ -145,6 +152,29 @@
fi
bsdinstall mount || error
;;
+"Classic") # only disk choise
+ disks=
+ debug= f_device_find "" $DEVICE_TYPE_DISK disks
+ f_device_sort_by name disks disks
+
+ disk_check_list=
+ for disk in $disks; do
+ desc=
+ $disk get name name
+ $disk get desc desc
+ f_shell_escape "$desc" desc
+ f_getvar _${disk}_status:-off onoff
+ disk_check_list="$disk_check_list
+ $name '$desc' "
+ done
+
+ exec 3>&1
+ DISK=`echo "$disk_check_list" | xargs dialog --backtitle 'FreeBSD Installer' --title 'Target Selection' --menu 'Please select a disk to install FreeBSD:' 0 0 0 2>&1 1>&3`
+ if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi
+ exec 3>&-
+
+ echo "PARTITIONS=\"$DISK { auto freebsd-ufs /}\"" >> "$TOFILE"
+ ;;
"ZFS") # ZFS
bsdinstall zfsboot || error
bsdinstall mount || error
@@ -154,7 +184,7 @@
;;
esac
-if [ ! -z "$FETCH_DISTRIBUTIONS" && -z "$TOFILE" ]; then
+if [ ! -z "$FETCH_DISTRIBUTIONS" -a -z "$TOFILE" ]; then
ALL_DISTRIBUTIONS="$DISTRIBUTIONS"
# Download to a directory in the new system as scratch space
More information about the svn-soc-all
mailing list