socsvn commit: r272743 - in soc2014/kczekirda/pxe-fai-head/tools/mfsbsd: conf customfiles/etc customfiles/usr customfiles/usr/libexec customfiles/usr/libexec/bsdinstall

kczekirda at FreeBSD.org kczekirda at FreeBSD.org
Wed Aug 20 22:34:12 UTC 2014


Author: kczekirda
Date: Wed Aug 20 22:34:08 2014
New Revision: 272743
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272743

Log:
  when you have clear BASE

Added:
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/auto   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/hostname   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/keymap   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/mirrorselect   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig_ipv4   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig_ipv6   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/script   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/services   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/time   (contents, props changed)
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/zfsboot   (contents, props changed)
Modified:
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/conf/loader.conf.sample
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/conf/rc.conf.sample
  soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/etc/dhclient.conf

Modified: soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/conf/loader.conf.sample
==============================================================================
--- soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/conf/loader.conf.sample	Wed Aug 20 21:44:48 2014	(r272742)
+++ soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/conf/loader.conf.sample	Wed Aug 20 22:34:08 2014	(r272743)
@@ -8,7 +8,7 @@
 #mfsbsd.autodhcp="YES"
 #
 # Define a new root password
-#mfsbsd.rootpw="foobar"
+mfsbsd.rootpw="mfsroot"
 #
 # Alternatively define a root password hash like in master.passwd
 # NOTICE: replace '$' characters with '%'

Modified: soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/conf/rc.conf.sample
==============================================================================
--- soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/conf/rc.conf.sample	Wed Aug 20 21:44:48 2014	(r272742)
+++ soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/conf/rc.conf.sample	Wed Aug 20 22:34:08 2014	(r272743)
@@ -7,7 +7,7 @@
 # see the interfaces.conf file in this directory.
 #
 # Set this to any desired hostname
-hostname="FreeBSDfai"
+hostname="FAIFreeBSD"
 #
 # You need a gateway defined for a working network setup
 #defaultrouter="192.168.0.254"

Modified: soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/etc/dhclient.conf
==============================================================================
--- soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/etc/dhclient.conf	Wed Aug 20 21:44:48 2014	(r272742)
+++ soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/etc/dhclient.conf	Wed Aug 20 22:34:08 2014	(r272743)
@@ -1,2 +1,2 @@
-request bootfile-name subnet-mask, broadcast-address, time-offset, routers,
+request bootfile-name, subnet-mask, broadcast-address, time-offset, routers,
         domain-search, domain-name, domain-name-servers, host-name;

Added: soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/auto
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/auto	Wed Aug 20 22:34:08 2014	(r272743)
@@ -0,0 +1,310 @@
+#!/bin/sh
+#-
+# Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/device.subr
+
+############################################################ FUNCTIONS
+
+error() {
+	test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR
+	test -f $PATH_FSTAB && bsdinstall umount
+	dialog --backtitle "FreeBSD Installer" --title "Abort" \
+	    --no-label "Exit" --yes-label "Restart" --yesno \
+	    "An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0
+	if [ $? -ne 0 ]; then
+		exit 1
+	else
+		exec $0
+	fi
+}
+
+############################################################ MAIN
+
+f_dprintf "Began Installation at %s" "$( date )"
+
+rm -rf $BSDINSTALL_TMPETC
+mkdir $BSDINSTALL_TMPETC
+
+trap true SIGINT	# This section is optional
+bsdinstall keymap
+
+trap error SIGINT	# Catch cntrl-C here
+bsdinstall hostname || error
+
+export DISTRIBUTIONS="base.txz kernel.txz"
+if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
+	DISTMENU=`awk -F'\t' '!/^(kernel|base)/{print $4,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST`
+
+	exec 3>&1
+	EXTRA_DISTS=$( eval dialog \
+	    --backtitle \"FreeBSD Installer\" \
+	    --title \"Distribution Select\" --nocancel --separate-output \
+	    --checklist \"Choose optional system components to install:\" \
+	    0 0 0 $DISTMENU \
+	2>&1 1>&3 )
+	for dist in $EXTRA_DISTS; do
+		export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz"
+	done
+    [ -n "$TOFILE" ] && echo "DISTRIBUTIONS=\"$DISTRIBUTIONS\"" >> "$TOFILE"
+fi
+
+FETCH_DISTRIBUTIONS=""
+for dist in $DISTRIBUTIONS; do
+	if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then
+		FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist"
+	fi
+done
+FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS`	# Trim white space
+
+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
+fi
+
+if [ -n "$FETCH_DISTRIBUTIONS" ]; then
+	exec 3>&1
+	BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3)
+	MIRROR_BUTTON=$?
+	exec 3>&-
+	test $MIRROR_BUTTON -eq 0 || error
+	export BSDINSTALL_DISTSITE
+fi
+
+if [ -z "$TOFILE" ]; then
+    rm -f $PATH_FSTAB
+    touch $PATH_FSTAB
+fi
+
+PMODES="\
+Guided \"Partitioning Tool (Recommended for Beginners)\" \
+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
+		PMODES="$PMODES ZFS \"Automatic Root-on-ZFS (Experimental)\""
+		;;
+	*)		# Booting ZFS Unspported
+		;;
+esac
+
+exec 3>&1
+PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \
+	--title "Partitioning" \
+	--menu "How would you like to partition your disk?" \
+	0 0 0 2>&1 1>&3` || exit 1
+exec 3>&-
+
+case "$PARTMODE" in
+"Guided")	# Guided
+	bsdinstall autopart || error
+	bsdinstall mount || error
+	;;
+"Shell")	# Shell
+	clear
+	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'."
+	sh 2>&1
+	;;
+"Manual")	# Manual
+	if f_isset debugFile; then
+		# Give partedit the path to our logfile so it can append
+		BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error
+	else
+		bsdinstall partedit || error
+	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
+    if [ -z "$TOFILE" ]; then
+        bsdinstall mount || error
+    fi
+	;;
+*)
+	error
+	;;
+esac
+
+if [ ! -z "$FETCH_DISTRIBUTIONS" -a -z "$TOFILE" ]; then
+	ALL_DISTRIBUTIONS="$DISTRIBUTIONS"
+
+	# Download to a directory in the new system as scratch space
+	BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/freebsd-dist"
+	mkdir -p "$BSDINSTALL_FETCHDEST" || error
+
+	export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS"
+	# Try to use any existing distfiles
+	if [ -d $BSDINSTALL_DISTDIR ]; then
+		DISTDIR_IS_UNIONFS=1
+		mount_nullfs -o union "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
+	else
+		export DISTRIBUTIONS="MANIFEST $ALL_DISTRIBUTIONS"
+		export BSDINSTALL_DISTDIR="$BSDINSTALL_FETCHDEST"
+	fi
+		
+	export FTP_PASSIVE_MODE=YES
+	bsdinstall distfetch || error
+	export DISTRIBUTIONS="$ALL_DISTRIBUTIONS"
+fi
+
+if [ -z "$TOFILE" ]; then
+    bsdinstall checksum || error
+    bsdinstall distextract || error
+    bsdinstall rootpass || error
+fi
+
+trap true SIGINT	# This section is optional
+if [ "$NETCONFIG_DONE" != yes ]; then
+	bsdinstall netconfig	# Don't check for errors -- the user may cancel
+fi
+bsdinstall time
+bsdinstall services
+
+if [ -z "$TOFILE" ]; then
+    dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \
+        "Would you like to add users to the installed system now?" 0 0 && \
+        bsdinstall adduser
+fi
+
+finalconfig() {
+	exec 3>&1
+	REVISIT=$(dialog --backtitle "FreeBSD Installer" \
+	    --title "Final Configuration" --no-cancel --menu \
+	    "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \
+		"Exit" "Apply configuration and exit installer" \
+		"Add User" "Add a user to the system" \
+		"Root Password" "Change root password" \
+		"Hostname" "Set system hostname" \
+		"Network" "Networking configuration" \
+		"Services" "Set daemons to run on startup" \
+		"Time Zone" "Set system timezone" \
+		"Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3)
+	exec 3>&-
+
+	case "$REVISIT" in
+	"Add User")
+		bsdinstall adduser
+		finalconfig
+		;;
+	"Root Password")
+		bsdinstall rootpass 
+		finalconfig
+		;;
+	"Hostname")
+		bsdinstall hostname
+		finalconfig
+		;;
+	"Network")
+		bsdinstall netconfig
+		finalconfig
+		;;
+	"Services")
+		bsdinstall services
+		finalconfig
+		;;
+	"Time Zone")
+		bsdinstall time
+		finalconfig
+		;;
+	"Handbook")
+		bsdinstall docsinstall
+		finalconfig
+		;;
+	esac
+}
+
+# Allow user to change his mind
+[ -z "$TOFILE" ] && finalconfig
+
+trap error SIGINT	# SIGINT is bad again
+if [ -z "$TOFILE" ]; then
+    bsdinstall config  || error
+fi
+
+if [ ! -z "$BSDINSTALL_FETCHDEST" -a -z "$TOFILE" ]; then
+	[ "$BSDINSTALL_FETCHDEST" != "$BSDINSTALL_DISTDIR" ] && \
+	    umount "$BSDINSTALL_DISTDIR"
+	rm -rf "$BSDINSTALL_FETCHDEST"
+fi
+
+if [ -z "$TOFILE" ]; then
+dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \
+    --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0
+if [ $? -eq 0 ]; then
+	clear
+	mount -t devfs devfs "$BSDINSTALL_CHROOT/dev"
+	echo This shell is operating in a chroot in the new system. \
+	    When finished making configuration changes, type \"exit\".
+	chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1
+fi
+
+bsdinstall entropy
+bsdinstall umount
+fi
+
+f_dprintf "Installation Completed at %s" "$( date )"
+
+################################################################################
+# END
+################################################################################

Added: soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/hostname
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/hostname	Wed Aug 20 22:34:08 2014	(r272743)
@@ -0,0 +1,53 @@
+#!/bin/sh
+#-
+# Copyright (c) 2011 Nathan Whitehorn
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+: ${DIALOG_OK=0}
+: ${DIALOG_CANCEL=1}
+: ${DIALOG_HELP=2}
+: ${DIALOG_EXTRA=3}
+: ${DIALOG_ITEM_HELP=4}
+: ${DIALOG_ESC=255}
+
+exec 3>&1
+HOSTNAME=`dialog --backtitle 'FreeBSD Installer' --title 'Set Hostname' --nocancel --inputbox \
+	'Please choose a hostname for this machine.
+
+If you are running on a managed network, please ask your network administrator for an appropriate name.' \
+	0 0 $(hostname) 2>&1 1>&3`
+if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi
+exec 3>&-
+
+if [ -z "$TOFILE" ]; then
+	echo "hostname=\"$HOSTNAME\"" > $BSDINSTALL_TMPETC/rc.conf.hostname 
+else
+	echo "HOSTNAME=\"$HOSTNAME\"" >> "$TOFILE"
+fi
+
+if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
+	hostname -s "$HOSTNAME"
+fi

Added: soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/keymap
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/keymap	Wed Aug 20 22:34:08 2014	(r272743)
@@ -0,0 +1,242 @@
+#!/bin/sh
+#-
+# Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+############################################################ INCLUDES
+ 
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/dialog.subr
+f_include $BSDCFG_SHARE/keymap.subr
+f_include $BSDCFG_SHARE/sysrc.subr
+
+############################################################ CONFIGURATION
+
+#
+# Default file to store keymap selection in
+#
+: ${KEYMAPFILE:=$BSDINSTALL_TMPETC/rc.conf.keymap}
+
+#
+# Default path to keymap INDEX containing descriptions
+#
+: ${MAPDESCFILE:=/usr/share/syscons/keymaps/INDEX.keymaps}
+
+############################################################ GLOBALS
+
+#
+# Strings that should be moved to an i18n file and loaded with f_include_lang()
+#
+hline_arrows_tab_enter="Press arrows, TAB or ENTER"
+msg_continue_with_keymap="Continue with %s keymap"
+msg_default="default"
+msg_error="Error"
+msg_freebsd_installer="FreeBSD Installer"
+msg_keymap_menu_text="The system console driver for FreeBSD defaults to standard \"US\"\nkeyboard map. Other keymaps can be chosen below."
+msg_keymap_selection="Keymap Selection"
+msg_ok="OK"
+msg_select="Select"
+msg_test_keymap="Test %s keymap"
+msg_test_the_currently_selected_keymap="Test the currently selected keymap"
+msg_test_the_keymap_by_typing="Test the keymap by typing letters, numbers, and symbols. Characters\nshould match labels on the keyboard keys. Press Enter to stop testing."
+
+############################################################ FUNCTIONS
+
+# dialog_keymap_test $keymap
+#
+# Activate $keymap and display an input box (without cancel button) for the
+# user to test keyboard input and return. Always returns success.
+#
+dialog_keymap_test()
+{
+	local keym="$1"
+	local title= # Calculated below
+	local btitle= # Calculated below
+	local prompt="$msg_test_the_keymap_by_typing"
+	local hline=
+
+	# Attempt to activate the keymap
+	if [ "$keym" ]; then
+		local err
+		err=$( f_keymap_kbdcontrol "$keym" 2>&1 > /dev/null )
+		if [ "$err" ]; then
+			f_dialog_title "$msg_error"
+			f_dialog_msgbox "$err"
+			f_dialog_title_restore
+			return $FAILURE
+		fi
+	fi
+
+	f_dialog_title "$( printf "$msg_test_keymap" "${keym:-$msg_default}" )"
+	title="$DIALOG_TITLE"
+	btitle="$DIALOG_BACKTITLE"
+	f_dialog_title_restore
+
+	local height width
+	f_dialog_inputbox_size height width \
+		"$title" "$btitle" "$prompt" "" "$hline"
+
+	$DIALOG \
+		--title "$title"      \
+		--backtitle "$btitle" \
+		--hline "$hline"      \
+		--ok-label "$msg_ok"  \
+		--no-cancel           \
+		--inputbox "$prompt"  \
+		$height $width        \
+		2>/dev/null >&$DIALOG_TERMINAL_PASSTHRU_FD
+
+	return $DIALOG_OK
+}
+
+############################################################ MAIN
+
+#
+# Initialize
+#
+f_dialog_title "$msg_keymap_selection"
+f_dialog_backtitle "$msg_freebsd_installer"
+
+#
+# Die immediately if we can't dump the current keyboard map
+#
+#error=$( kbdcontrol -d 2>&1 > /dev/null ) || f_die $FAILURE "%s" "$error"
+
+# Capture Ctrl-C for clean-up
+trap 'rm -f $KEYMAPFILE; exit $FAILURE' SIGINT
+
+# Get a value from rc.conf(5) as initial value (if not being scripted)
+f_getvar $VAR_KEYMAP keymap
+if [ ! "$keymap" ]; then
+	keymap=$( f_sysrc_get keymap )
+	case "$keymap" in [Nn][Oo]) keymap="";; esac
+fi
+
+#
+# Loop until the user has finalized their selection (by clicking the
+# [relabeled] Cancel button).
+#
+width=67 first_pass=1 back_from_testing=
+[ "$USE_XDIALOG" ] && width=70
+prompt="$msg_keymap_menu_text"
+hline="$hline_arrows_tab_enter"
+while :; do
+	#
+	# Re/Build list of keymaps
+	#
+	cont_msg=$( printf "$msg_continue_with_keymap" \
+	                   "${keymap:-$msg_default}" )
+	test_msg=$( printf "$msg_test_keymap" "${keymap:-$msg_default}" )
+	menu_list="
+		'>>> $cont_msg' '' '$msg_continue_with_current_keymap'
+		'->- $test_msg' '' '$msg_test_the_currently_selected_keymap'
+	" # END-QUOTE
+	if [ "$first_pass" ]; then
+		defaultitem=
+		first_pass=
+	else
+		defaultitem="->- $test_msg"
+	fi
+	for k in $KEYMAPS; do
+		keymap_$k get keym keym
+		keymap_$k get desc desc
+		radio=" "
+		if [ "$keym" = "$keymap" ]; then
+			radio="*"
+			if [ "$back_from_testing" ]; then
+				defaultitem="(*) $desc"
+				back_from_testing=
+			fi
+		fi
+		f_shell_escape "$desc" desc
+		menu_list="$menu_list
+			'($radio) $desc' '' '$keym: $desc'
+		" # END-QUOTE
+	done
+	back_from_testing=
+
+	#
+	# Display keymap configuration menu
+	#
+	eval f_dialog_menu_with_help_size height \"\" rows \
+		\"\$DIALOG_TITLE\"     \
+		\"\$DIALOG_BACKTITLE\" \
+		\"\$prompt\"           \
+		\"\$hline\"            \
+		$menu_list
+	menu_choice=$( eval $DIALOG \
+		--title \"\$DIALOG_TITLE\"         \
+		--backtitle \"\$DIALOG_BACKTITLE\" \
+		--hline \"\$hline\"                \
+		--keep-tite                        \
+		--item-help                        \
+		--ok-label \"\$msg_select\"        \
+		--cancel-label \"\$msg_cancel\"    \
+		--default-item \"\$defaultitem\"   \
+		--menu \"\$prompt\"                \
+		$height $width $rows               \
+		$menu_list                         \
+		2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
+	) || {
+		f_quietly rm -f "$KEYMAPFILE"
+		exit $FAILURE # Exit with an error so bsdinstall restarts
+	}
+	f_dialog_data_sanitize menu_choice
+
+	case "$menu_choice" in
+	">>> "*) # Continue with keymap
+		break ;;
+	"->-"*) # Test keymap
+		dialog_keymap_test "$keymap"
+		back_from_testing=1
+		continue ;;
+	esac
+
+	# Turn the user's choice into a number
+	n=$( eval f_dialog_menutag2index_with_help \
+		\"\$menu_choice\" $menu_list )
+
+	# Turn that number in the name of the keymap struct
+	k=$( set -- $KEYMAPS; eval echo \"\${$(( $n - 2))}\" )
+
+	# Get actual keymap setting while we update $keymap and $KEYMAPFILE
+	keymap_$k get keym keymap
+	if [ -z "$TOFILE" ]; then
+		echo "keymap=\"$keymap\"" > "$KEYMAPFILE"
+	else
+		echo "KEYMAP=\"$keymap\"" >> "$TOFILE"
+	fi
+
+done
+
+f_quietly f_keymap_kbdcontrol "$keymap"
+
+################################################################################
+# END
+################################################################################

Added: soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/mirrorselect
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/mirrorselect	Wed Aug 20 22:34:08 2014	(r272743)
@@ -0,0 +1,198 @@
+#!/bin/sh
+#-
+# Copyright (c) 2011 Nathan Whitehorn
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+: ${DIALOG_OK=0}
+: ${DIALOG_CANCEL=1}
+: ${DIALOG_HELP=2}
+: ${DIALOG_EXTRA=3}
+: ${DIALOG_ITEM_HELP=4}
+: ${DIALOG_ESC=255}
+
+exec 3>&1
+MIRROR=`dialog --backtitle "FreeBSD Installer" \
+    --title "Mirror Selection" --extra-button --extra-label "Other" \
+    --menu "Please select the site closest to you or \"other\" if you'd like to specify a different choice.  Also note that not every site listed here carries more than the base distribution kits. Only Primary sites are guaranteed to carry the full range of possible distributions. Select a site that's close!" \
+    0 0 0 \
+	ftp://ftp.freebsd.org	"Main Site"\
+	ftp://ftp.freebsd.org 	"IPv6 Main Site"\
+	ftp://ftp3.ie.freebsd.org 	"IPv6 Ireland"\
+	ftp://ftp2.jp.freebsd.org 	"IPv6 Japan"\
+	ftp://ftp4.se.freebsd.org	"IPv6 Sweden"\
+	ftp://ftp4.us.freebsd.org 	"IPv6 USA"\
+	ftp://ftp2.tr.freebsd.org 	"IPv6 Turkey"\
+	ftp://ftp1.freebsd.org 	"Primary"\
+	ftp://ftp2.freebsd.org 	"Primary #2"\
+	ftp://ftp3.freebsd.org 	"Primary #3"\
+	ftp://ftp4.freebsd.org 	"Primary #4"\
+	ftp://ftp5.freebsd.org 	"Primary #5"\
+	ftp://ftp6.freebsd.org 	"Primary #6"\
+	ftp://ftp7.freebsd.org 	"Primary #7"\
+	ftp://ftp10.freebsd.org 	"Primary #10"\
+	ftp://ftp11.freebsd.org 	"Primary #11"\
+	ftp://ftp12.freebsd.org 	"Primary #12"\
+	ftp://ftp13.freebsd.org 	"Primary #13"\
+	ftp://ftp14.freebsd.org 	"Primary #14"\
+	ftp://ftp1.am.freebsd.org 	"Armenia"\
+	ftp://ftp.au.freebsd.org 	"Australia"\
+	ftp://ftp2.au.freebsd.org 	"Australia #2"\
+	ftp://ftp3.au.freebsd.org 	"Australia #3"\
+	ftp://ftp.at.freebsd.org 	"Austria"\
+	ftp://ftp2.br.freebsd.org 	"Brazil #2"\
+	ftp://ftp3.br.freebsd.org 	"Brazil #3"\
+	ftp://ftp4.br.freebsd.org 	"Brazil #4"\
+	ftp://ftp.ca.freebsd.org 	"Canada"\
+	ftp://ftp.cn.freebsd.org 	"China"\
+	ftp://ftp.cz.freebsd.org 	"Czech Republic"\
+	ftp://ftp.dk.freebsd.org 	"Denmark"\
+	ftp://ftp.ee.freebsd.org 	"Estonia"\
+	ftp://ftp.fi.freebsd.org 	"Finland"\
+	ftp://ftp.fr.freebsd.org 	"France"\
+	ftp://ftp3.fr.freebsd.org 	"France #3"\
+	ftp://ftp4.fr.freebsd.org 	"IPv6 France #4"\
+	ftp://ftp5.fr.freebsd.org 	"France #5"\
+	ftp://ftp6.fr.freebsd.org 	"France #6"\
+	ftp://ftp7.fr.freebsd.org 	"France #7"\
+	ftp://ftp8.fr.freebsd.org 	"IPv6 France #8"\
+	ftp://ftp.de.freebsd.org 	"Germany"\
+	ftp://ftp2.de.freebsd.org 	"Germany #2"\
+	ftp://ftp4.de.freebsd.org 	"Germany #4"\
+	ftp://ftp5.de.freebsd.org 	"Germany #5"\
+	ftp://ftp6.de.freebsd.org 	"Germany #6"\
+	ftp://ftp7.de.freebsd.org 	"Germany #7"\
+	ftp://ftp8.de.freebsd.org 	"Germany #8"\
+	ftp://ftp.gr.freebsd.org 	"Greece"\
+	ftp://ftp2.gr.freebsd.org 	"Greece #2"\
+	ftp://ftp3.ie.freebsd.org 	"Ireland #3"\
+	ftp://ftp.il.freebsd.org 	"Israel"\
+	ftp://ftp.it.freebsd.org 	"Italy"\
+	ftp://ftp.jp.freebsd.org 	"Japan"\
+	ftp://ftp2.jp.freebsd.org 	"Japan #2"\
+	ftp://ftp3.jp.freebsd.org 	"Japan #3"\
+	ftp://ftp4.jp.freebsd.org 	"Japan #4"\
+	ftp://ftp5.jp.freebsd.org 	"Japan #5"\
+	ftp://ftp6.jp.freebsd.org 	"Japan #6"\
+	ftp://ftp7.jp.freebsd.org 	"Japan #7"\
+	ftp://ftp8.jp.freebsd.org 	"Japan #8"\
+	ftp://ftp9.jp.freebsd.org 	"Japan #9"\
+	ftp://ftp.kr.freebsd.org 	"Korea"\
+	ftp://ftp2.kr.freebsd.org 	"Korea #2"\
+	ftp://ftp.lv.freebsd.org 	"Latvia"\
+	ftp://ftp.lt.freebsd.org 	"Lithuania"\
+	ftp://ftp.nl.freebsd.org 	"Netherlands"\
+	ftp://ftp2.nl.freebsd.org 	"Netherlands #2"\
+	ftp://ftp.nz.freebsd.org 	"New Zealand"\
+	ftp://ftp.no.freebsd.org 	"Norway"\
+	ftp://ftp.pl.freebsd.org 	"Poland"\
+	ftp://ftp2.pl.freebsd.org 	"Poland #2"\
+	ftp://ftp.ru.freebsd.org 	"Russia"\
+	ftp://ftp2.ru.freebsd.org 	"Russia #2"\
+	ftp://ftp4.ru.freebsd.org 	"Russia #4"\
+	ftp://ftp5.ru.freebsd.org 	"Russia #5"\
+	ftp://ftp6.ru.freebsd.org 	"Russia #6"\
+	ftp://ftp.sk.freebsd.org 	"Slovak Republic"\
+	ftp://ftp2.sk.freebsd.org 	"Slovak Republic #2"\
+	ftp://ftp.si.freebsd.org 	"Slovenia"\
+	ftp://ftp.za.freebsd.org 	"South Africa"\
+	ftp://ftp2.za.freebsd.org 	"South Africa #2"\
+	ftp://ftp4.za.freebsd.org 	"South Africa #4"\
+	ftp://ftp.es.freebsd.org 	"Spain"\
+	ftp://ftp3.es.freebsd.org 	"Spain #3"\
+	ftp://ftp.se.freebsd.org 	"Sweden"\
+	ftp://ftp2.se.freebsd.org 	"Sweden #2"\
+	ftp://ftp3.se.freebsd.org 	"Sweden #3"\
+	ftp://ftp4.se.freebsd.org 	"Sweden #4"\
+	ftp://ftp6.se.freebsd.org 	"Sweden #6"\
+	ftp://ftp.ch.freebsd.org 	"Switzerland"\
+	ftp://ftp.tw.freebsd.org 	"Taiwan"\
+	ftp://ftp2.tw.freebsd.org 	"Taiwan #2"\
+	ftp://ftp3.tw.freebsd.org 	"Taiwan #3"\
+	ftp://ftp4.tw.freebsd.org 	"Taiwan #4"\
+	ftp://ftp6.tw.freebsd.org 	"Taiwan #6"\
+	ftp://ftp11.tw.freebsd.org 	"Taiwan #11"\
+	ftp://ftp.uk.freebsd.org 	"UK"\
+	ftp://ftp2.uk.freebsd.org 	"UK #2"\
+	ftp://ftp3.uk.freebsd.org 	"UK #3"\
+	ftp://ftp4.uk.freebsd.org 	"UK #4"\
+	ftp://ftp5.uk.freebsd.org 	"UK #5"\
+	ftp://ftp.ua.freebsd.org 	"Ukraine"\
+	ftp://ftp7.ua.freebsd.org 	"Ukraine #7"\
+	ftp://ftp1.us.freebsd.org 	"USA #1"\
+	ftp://ftp2.us.freebsd.org 	"USA #2"\
+	ftp://ftp3.us.freebsd.org 	"USA #3"\
+	ftp://ftp4.us.freebsd.org 	"USA #4"\
+	ftp://ftp5.us.freebsd.org 	"USA #5"\
+	ftp://ftp6.us.freebsd.org 	"USA #6"\
+	ftp://ftp8.us.freebsd.org 	"USA #8"\
+	ftp://ftp10.us.freebsd.org 	"USA #10"\
+	ftp://ftp11.us.freebsd.org 	"USA #11"\
+	ftp://ftp13.us.freebsd.org 	"USA #13"\
+	ftp://ftp14.us.freebsd.org 	"USA #14"\
+	ftp://ftp15.us.freebsd.org 	"USA #15"\
+    2>&1 1>&3`
+MIRROR_BUTTON=$?
+exec 3>&-
+
+_UNAME_R=`uname -r`
+
+case ${_UNAME_R} in
+	*-CURRENT|*-STABLE|*-PRERELEASE)
+		RELDIR="snapshots"
+		;;
+	*)
+		RELDIR="releases"
+		;;
+esac
+
+BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD/${RELDIR}/`uname -m`/`uname -p`/${_UNAME_R}"
+
+if [ "$TOFILE" ]; then
+	echo "MIRROR=\"$MIRROR\"" >> "$TOFILE"
+	echo "RELDIR=\"$RELDIR\"" >> "$TOFILE"
+	echo "RELEASE=\"${_UNAME_R}\"" >> "$TOFILE"
+fi
+
+case $MIRROR_BUTTON in
+$DIALOG_CANCEL)
+	exit 1
+	;;
+$DIALOG_OK)
+	;;
+$DIALOG_EXTRA)
+	exec 3>&1
+	BSDINSTALL_DISTSITE=`dialog --backtitle "FreeBSD Installer" \
+	    --title "Mirror Selection" \
+	    --inputbox "Please enter the URL to an alternate FreeBSD mirror:" \
+	    0 0 "$BSDINSTALL_DISTSITE" 2>&1 1>&3`
+	MIRROR_BUTTON=$?
+	exec 3>&-
+	test $MIRROR_BUTTON -eq 0 || exec $0 $@
+	;;
+esac
+
+export BSDINSTALL_DISTSITE
+echo $BSDINSTALL_DISTSITE >&2

Added: soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/kczekirda/pxe-fai-head/tools/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig	Wed Aug 20 22:34:08 2014	(r272743)
@@ -0,0 +1,249 @@
+#!/bin/sh
+#-
+# Copyright (c) 2011 Nathan Whitehorn
+# All rights reserved.
+# Copyright (c) 2011 The FreeBSD Foundation
+# All rights reserved.
+#
+# Portions of this software were developed by Bjoern Zeeb
+# under sponsorship from the FreeBSD Foundation.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+
+INTERFACES=""
+DIALOG_TAGS=""
+
+: ${DIALOG_OK=0}
+: ${DIALOG_CANCEL=1}
+: ${DIALOG_HELP=2}
+: ${DIALOG_EXTRA=3}
+: ${DIALOG_ITEM_HELP=4}
+: ${DIALOG_ESC=255}
+
+# Do a dirty check to see if this a wireless interface -- there should be a
+# better way
+is_wireless_if() {
+	ifconfig $1 | grep -q 'media: IEEE 802.11 Wireless'
+}
+
+for IF in `ifconfig -l`; do
+	test "$IF" = "lo0" && continue
+	(ifconfig -g wlan | egrep -wq $IF) && continue
+	INTERFACES="$INTERFACES $IF"
+	DESC=`sysctl -n dev.$(echo $IF | sed -E 's/([[:alpha:]]*)([[:digit:]]*)/\1.\2/g').%desc`
+	is_wireless_if $IF && echo $DESC |
+		grep -iqv wireless && DESC="Wireless $DESC"
+	DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\""
+done
+
+if [ -z "$INTERFACES" ]; then
+	dialog --backtitle 'FreeBSD Installer' \
+	    --title 'Network Configuration Error' \
+	    --msgbox 'No network interfaces present to configure.' 0 0
+	exit 1
+fi
+
+exec 3>&1
+INTERFACE=`echo $DIALOG_TAGS | xargs dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3`
+if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi
+exec 3>&-
+
+if [ -z "$TOFILE" ]; then
+	: > $BSDINSTALL_TMPETC/._rc.conf.net
+else
+	echo INTERFACE=\"$INTERFACE\" >> "$TOFILE"
+fi
+
+IFCONFIG_PREFIX=""
+if is_wireless_if $INTERFACE; then
+	NEXT_WLAN_IFACE=wlan0	# XXX
+	echo wlans_$INTERFACE=\"$NEXT_WLAN_IFACE\" >> $BSDINSTALL_TMPETC/._rc.conf.net
+	IFCONFIG_PREFIX="WPA "
+	if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
+		ifconfig $NEXT_WLAN_IFACE create wlandev $INTERFACE
+		ifconfig $NEXT_WLAN_IFACE up
+	fi
+	bsdinstall wlanconfig $NEXT_WLAN_IFACE || exec $0
+	INTERFACE="$NEXT_WLAN_IFACE"
+fi
+
+IPV6_AVAIL=0
+IPV4_AVAIL=0
+sysctl -N kern.features.inet6 > /dev/null 2>&1
+case $? in
+0)	IPV6_AVAIL=1 ;;
+esac
+sysctl -N kern.features.inet > /dev/null 2>&1
+case $? in
+0)	IPV4_AVAIL=1 ;;
+esac
+
+if [ ${IPV4_AVAIL} -eq 1 ]; then
+	dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
+	    --yesno 'Would you like to configure IPv4 for this interface?' 0 0
+	if [ $? -eq $DIALOG_OK ]; then
+		bsdinstall netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" || \
+		exec $0
+	else
+		IPV4_AVAIL=0
+		[ "$TOFILE" ] && echo IPV4=\"NO\" >> "$TOFILE"
+	fi
+fi
+# In case wlanconfig left an option and we do not support IPv4 we need to write
+# it out on its own.  We cannot write it out with IPv6 as that suffix.
+if [ ${IPV4_AVAIL} -eq 0 -a -n ${IFCONFIG_PREFIX} ]; then
+	echo ifconfig_${INTERFACE}=\"${IFCONFIG_PREFIX}\" >> $BSDINSTALL_TMPETC/._rc.conf.net
+fi
+if [ ${IPV6_AVAIL} -eq 1 ]; then
+	dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
+	    --yesno 'Would you like to configure IPv6 for this interface?' 0 0
+	if [ $? -eq $DIALOG_OK ]; then
+		bsdinstall netconfig_ipv6 ${INTERFACE} || exec $0
+	else
+		IPV6_AVAIL=0
+		[ "$TOFILE" ] && echo IPV6=\"NO\" >> "$TOFILE"
+	fi
+fi
+
+[ "$TOFILE" ] && cp /etc/resolv.conf $BSDINSTALL_TMPETC
+
+SEARCH=""
+IP4_1=""
+IP4_2=""
+IP6_1=""
+IP6_2=""
+while read key value; do
+	case "${key}" in
+	search)		SEARCH="${value}" ;;
+	nameserver)	# is more trick as we have to distinguish v4 and v6
+		case "${value}" in
+		[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)
+			if [ -z "${IP4_1}" ] ; then
+				IP4_1="${value}"
+			elif [ -z "${IP4_2}" ]; then
+				IP4_2="${value}"
+			fi
+			;;
+		[0-9A-Fa-f:]*:*)
+			if [ -z "${IP6_1}" ] ; then
+				IP6_1="${value}"
+			elif [ -z "${IP6_2}" ]; then
+				IP6_2="${value}"
+			fi
+			;;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-soc-all mailing list