Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 2015 18:18:40 GMT
From:      kczekirda@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r290043 - in soc2015/kczekirda: mfsbsd/conf mfsbsd/customfiles mfsbsd/customfiles/usr mfsbsd/customfiles/usr/libexec mfsbsd/customfiles/usr/libexec/bsdinstall www
Message-ID:  <201508211818.t7LIIeO4008597@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kczekirda
Date: Fri Aug 21 18:18:39 2015
New Revision: 290043
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=290043

Log:
  mfsbsd for testing

Added:
  soc2015/kczekirda/mfsbsd/customfiles/
  soc2015/kczekirda/mfsbsd/customfiles/usr/
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/auto   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/hostname   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/keymap   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/mirrorselect   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig_ipv4   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig_ipv6   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/script   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/services   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/time   (contents, props changed)
  soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/zfsboot   (contents, props changed)
Modified:
  soc2015/kczekirda/mfsbsd/conf/rc.conf.sample
  soc2015/kczekirda/mfsbsd/conf/rc.local.sample
  soc2015/kczekirda/www/mfsbsd_cluster.iso

Modified: soc2015/kczekirda/mfsbsd/conf/rc.conf.sample
==============================================================================
--- soc2015/kczekirda/mfsbsd/conf/rc.conf.sample	Fri Aug 21 18:01:46 2015	(r290042)
+++ soc2015/kczekirda/mfsbsd/conf/rc.conf.sample	Fri Aug 21 18:18:39 2015	(r290043)
@@ -22,3 +22,4 @@
 sendmail_enable="NONE"
 cron_enable="NO"
 local_enable="YES"
+ntpd_enable="YES"

Modified: soc2015/kczekirda/mfsbsd/conf/rc.local.sample
==============================================================================
--- soc2015/kczekirda/mfsbsd/conf/rc.local.sample	Fri Aug 21 18:01:46 2015	(r290042)
+++ soc2015/kczekirda/mfsbsd/conf/rc.local.sample	Fri Aug 21 18:18:39 2015	(r290043)
@@ -1,2 +1,11 @@
-# sample rc.local 
-# add your code below
\ No newline at end of file
+#!/bin/sh
+
+#echo "CC=clang" >> /etc/make.conf
+#echo "CXX=clang++" >> /etc/make.conf
+#echo "CPP=clang-cpp" >> /etc/make.conf
+
+sleep 10
+
+mkdir /cluster
+mount -t nfs -o nolockd 192.168.22.19:/mnt/tank/freebsd/$(hostname)/cluster /cluster
+sh -x /cluster/run.sh > /cluster/run.log 2>&1 &

Added: soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/auto
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/auto	Fri Aug 21 18:18:39 2015	(r290043)
@@ -0,0 +1,272 @@
+#!/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
+
+############################################################ FUNCTIONS
+
+error() {
+	local msg
+	if [ -n "$1" ]; then
+		msg="$1\n\n"
+	fi
+	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 \
+	    "${msg}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 "Set hostname failed"
+
+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
+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" ]; 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 "No mirror selected"
+	export BSDINSTALL_DISTSITE
+fi
+
+rm -f $PATH_FSTAB
+touch $PATH_FSTAB
+
+PMODES="\
+\"Auto (UFS)\" \"Guided Disk Setup\" \
+Manual \"Manual Disk Setup (experts)\" \
+Shell \"Open a shell and partition by hand\""
+
+CURARCH=$( uname -m )
+case $CURARCH in
+	amd64|i386)	# Booting ZFS Supported
+		PMODES="$PMODES \"Auto (ZFS)\" \"Guided Root-on-ZFS\""
+		;;
+	*)		# 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
+"Auto (UFS)")	# Guided
+	bsdinstall autopart || error "Partitioning error"
+	bsdinstall mount || error "Failed to mount filesystem"
+	;;
+"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 "Partitioning error"
+	else
+		bsdinstall partedit || error "Partitioning error"
+	fi
+	bsdinstall mount || error "Failed to mount filesystem"
+	;;
+"Auto (ZFS)")	# ZFS
+	bsdinstall zfsboot || error "ZFS setup failed"
+	bsdinstall mount || error "Failed to mount filesystem"
+	;;
+*)
+	error "Unknown partitioning mode"
+	;;
+esac
+
+if [ ! -z "$FETCH_DISTRIBUTIONS" ]; 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 "Could not create directory $BSDINSTALL_FETCHDEST"
+
+	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 "Failed to fetch distribution"
+	export DISTRIBUTIONS="$ALL_DISTRIBUTIONS"
+fi
+
+bsdinstall checksum || error "Distribution checksum failed"
+bsdinstall distextract || error "Distribution extract failed"
+bsdinstall rootpass || error "Could not set root password"
+
+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
+
+dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \
+	"Would you like to add users to the installed system now?" 0 0 && \
+	bsdinstall adduser
+
+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
+finalconfig
+
+trap error SIGINT	# SIGINT is bad again
+bsdinstall config  || error "Failed to save config"
+
+if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then
+	[ "$BSDINSTALL_FETCHDEST" != "$BSDINSTALL_DISTDIR" ] && \
+	    umount "$BSDINSTALL_DISTDIR"
+	rm -rf "$BSDINSTALL_FETCHDEST"
+fi
+
+dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \
+    --default-button no --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
+
+f_dprintf "Installation Completed at %s" "$( date )"
+
+################################################################################
+# END
+################################################################################

Added: soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/hostname
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/hostname	Fri Aug 21 18:18:39 2015	(r290043)
@@ -0,0 +1,48 @@
+#!/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>&-
+
+echo "hostname=\"$HOSTNAME\"" > $BSDINSTALL_TMPETC/rc.conf.hostname
+if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
+	hostname -s "$HOSTNAME"
+fi

Added: soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/keymap
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/keymap	Fri Aug 21 18:18:39 2015	(r290043)
@@ -0,0 +1,237 @@
+#!/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 ithe 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
+	echo "keymap=\"$keymap\"" > "$KEYMAPFILE"
+done
+
+f_quietly f_keymap_kbdcontrol "$keymap"
+
+################################################################################
+# END
+################################################################################

Added: soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/mirrorselect
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/mirrorselect	Fri Aug 21 18:18:39 2015	(r290043)
@@ -0,0 +1,193 @@
+#!/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`
+_UNAME_R=${_UNAME_R%-p*}
+
+case ${_UNAME_R} in
+	*-CURRENT|*-STABLE|*-PRERELEASE)
+		RELDIR="snapshots"
+		;;
+	*)
+		RELDIR="releases"
+		;;
+esac
+
+BSDINSTALL_DISTSITE="$MIRROR/pub/FreeBSD/${RELDIR}/`uname -m`/`uname -p`/${_UNAME_R}"
+
+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: soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/kczekirda/mfsbsd/customfiles/usr/libexec/bsdinstall/netconfig	Fri Aug 21 18:18:39 2015	(r290043)
@@ -0,0 +1,212 @@
+#!/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>&-
+
+: > $BSDINSTALL_TMPETC/._rc.conf.net
+
+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
+	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
+	fi
+fi
+
+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
+			;;
+		esac
+		;;
+	# ignore others
+	esac
+done < ${BSDINSTALL_TMPETC}/resolv.conf
+
+RESOLV=""
+if [ ${IPV6_AVAIL} -eq 1 -a ${IPV4_AVAIL} -eq 1 ];  then
+	RESOLV="
+	    'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0
+	    'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2
+	    'IPv6 DNS #1' 2 0 \"${IP6_1}\" 2 16 50 0 0
+	    'IPv6 DNS #2' 3 0 \"${IP6_2}\" 3 16 50 0 0
+	    'IPv4 DNS #1' 4 0 \"${IP4_1}\" 4 16 16 0 0
+	    'IPv4 DNS #2' 5 0 \"${IP4_2}\" 5 16 16 0 0"
+elif [ ${IPV6_AVAIL} -eq 1 ]; then
+	RESOLV="
+	    'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0
+	    'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2
+	    'IPv6 DNS #1' 2 0 \"${IP6_1}\" 2 16 50 0 0
+	    'IPv6 DNS #2' 3 0 \"${IP6_2}\" 3 16 50 0 0"
+elif [ ${IPV4_AVAIL} -eq 1 ]; then
+	RESOLV="
+	    'Search' 1 0 \"${SEARCH}\" 1 16 50 0 0
+	    'Nameserver' 2 0 \"Nameserver\" 2 16 50 0 2
+	    'IPv4 DNS #1' 2 0 \"${IP4_1}\" 2 16 16 0 0
+	    'IPv4 DNS #2' 3 0 \"${IP4_2}\" 3 16 16 0 0"
+else
+	exit 0
+fi
+
+exec 3>&1
+RESOLV=$(echo "${RESOLV}" | xargs dialog --backtitle 'FreeBSD Installer' \
+	--title 'Network Configuration' \
+	--mixedform 'Resolver Configuration' 0 0 0 \
+2>&1 1>&3)
+if [ $? -eq $DIALOG_CANCEL ]; then exec $0; fi
+exec 3>&-
+
+echo ${RESOLV} | tr ' ' '\n' | \
+awk '
+BEGIN {
+	search=-1;
+}
+{
+	if (/^[[:space:]]+$/) {
+		next;
+	}
+	if (/^Nameserver$/) {
+		printf "\n";
+		search=0;
+		next;
+	}
+	if (search == -1) {
+		printf "search ";
+		search=1;
+	}
+	if (search > 0) {
+		printf "%s%s", (search > 1) ? " " : "", $1;
+		search++;
+		next;
+	}
+	printf "nameserver %s\n", $1;
+}' > ${BSDINSTALL_TMPETC}/resolv.conf
+

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508211818.t7LIIeO4008597>