mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
bsdinstall: allow whitelabeling the scripts
Approved by: allanjude, asiciliano Differential Revision: https://reviews.freebsd.org/D35197 Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
33005c89c6
commit
cc42ef5328
21 changed files with 89 additions and 59 deletions
|
|
@ -36,6 +36,12 @@ if [ ! "$_COMMON_SUBR" ]; then _COMMON_SUBR=1
|
|||
: ${TERMINAL_STDOUT_PASSTHRU:=3}
|
||||
: ${TERMINAL_STDERR_PASSTHRU:=4}
|
||||
|
||||
#
|
||||
# Default OSNAME shown in the installer
|
||||
#
|
||||
: ${OSNAME:=FreeBSD}
|
||||
: ${EFI_LABEL_NAME:=FreeBSD}
|
||||
|
||||
############################################################ GLOBALS
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -26,8 +26,11 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
|
||||
clear
|
||||
echo "FreeBSD Installer"
|
||||
echo "$OSNAME Installer"
|
||||
echo "========================"
|
||||
echo "Add Users"
|
||||
echo
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ msg_auto_zfs="Auto (ZFS)"
|
|||
msg_auto_zfs_desc="Guided Root-on-ZFS"
|
||||
msg_auto_zfs_help="To use ZFS with less than 8GB RAM, see https://wiki.freebsd.org/ZFSTuningGuide"
|
||||
msg_exit="Exit"
|
||||
msg_freebsd_installer="FreeBSD Installer"
|
||||
msg_freebsd_installer="$OSNAME Installer"
|
||||
msg_gpt_active_fix="Your hardware is known to have issues booting in CSM/Legacy/BIOS mode from GPT partitions that are not set active. Would you like the installer to apply this workaround for you?"
|
||||
msg_lenovo_fix="Your model of Lenovo is known to have a BIOS bug that prevents it booting from GPT partitions without UEFI. Would you like the installer to apply a workaround for you?"
|
||||
msg_manual="Manual"
|
||||
|
|
@ -160,7 +160,7 @@ if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
|
|||
if [ -n "$DISTMENU" ]; then
|
||||
exec 3>&1
|
||||
EXTRA_DISTS=$( eval dialog \
|
||||
--backtitle \"FreeBSD Installer\" \
|
||||
--backtitle \"$OSNAME Installer\" \
|
||||
--title \"Distribution Select\" --nocancel --separate-output \
|
||||
--checklist \"Choose optional system components to install:\" \
|
||||
0 0 0 $DISTMENU \
|
||||
|
|
@ -179,7 +179,7 @@ for dist in $DISTRIBUTIONS; do
|
|||
done
|
||||
|
||||
if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" ]; then
|
||||
dialog --backtitle "FreeBSD Installer" --title "Network Installation" --msgbox "Some installation files were not 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
|
||||
dialog --backtitle "$OSNAME Installer" --title "Network Installation" --msgbox "Some installation files were not 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
|
||||
|
|
@ -299,7 +299,7 @@ case $CURARCH in
|
|||
esac
|
||||
|
||||
exec 3>&1
|
||||
PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \
|
||||
PARTMODE=`echo $PMODES | xargs dialog --backtitle "$OSNAME Installer" \
|
||||
--title "Partitioning" \
|
||||
--item-help \
|
||||
--menu "How would you like to partition your disk?" \
|
||||
|
|
@ -358,15 +358,15 @@ bsdinstall time
|
|||
bsdinstall services
|
||||
bsdinstall hardening
|
||||
|
||||
dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \
|
||||
dialog --backtitle "$OSNAME 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" \
|
||||
REVISIT=$(dialog --backtitle "$OSNAME 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 \
|
||||
"Setup of your $OSNAME 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" \
|
||||
|
|
@ -375,7 +375,7 @@ finalconfig() {
|
|||
"Services" "Set daemons to run on startup" \
|
||||
"System Hardening" "Set security options" \
|
||||
"Time Zone" "Set system timezone" \
|
||||
"Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3)
|
||||
"Handbook" "Install $OSNAME Handbook (requires network)" 2>&1 1>&3)
|
||||
exec 3>&-
|
||||
|
||||
case "$REVISIT" in
|
||||
|
|
@ -424,7 +424,7 @@ if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then
|
|||
rm -rf "$BSDINSTALL_FETCHDEST"
|
||||
fi
|
||||
|
||||
dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \
|
||||
dialog --backtitle "$OSNAME 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
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@
|
|||
# $FreeBSD$
|
||||
|
||||
|
||||
FREEBSD_BOOTLABEL="FreeBSD"
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
f_dprintf "%s: loading_includes..." "$0"
|
||||
|
|
@ -65,31 +63,31 @@ dialog_uefi_entryname()
|
|||
|
||||
update_uefi_bootentry()
|
||||
{
|
||||
nentries=$(efibootmgr | grep -c 'FreeBSD$')
|
||||
nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$")
|
||||
# No entries so directly create one and return
|
||||
if [ ${nentries} -eq 0 ]; then
|
||||
f_dprintf "Creating UEFI boot entry"
|
||||
efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null
|
||||
efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null
|
||||
return
|
||||
fi
|
||||
|
||||
$DIALOG --backtitle 'FreeBSD Installer' --title 'Boot configuration' \
|
||||
--yesno 'There are multiple "FreeBSD" EFI boot entries. Would you like to remove them all and add a new one?' 0 0
|
||||
$DIALOG --backtitle "$OSNAME Installer" --title 'Boot configuration' \
|
||||
--yesno "There are multiple \"$OSNAME\" EFI boot entries. Would you like to remove them all and add a new one?" 0 0
|
||||
if [ $? -eq $DIALOG_OK ]; then
|
||||
for entry in $(efibootmgr | awk '$NF == "FreeBSD" { sub(/.*Boot/,"", $1); sub(/\*/,"", $1); print $1 }'); do
|
||||
for entry in $(efibootmgr | awk "\$NF == \"$EFI_LABEL_NAME\" { sub(/.*Boot/,\"\", \$1); sub(/\*/,\"\", \$1); print \$1 }"); do
|
||||
efibootmgr -B -b ${entry}
|
||||
done
|
||||
efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null
|
||||
efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null
|
||||
return
|
||||
fi
|
||||
|
||||
FREEBSD_BOOTLABEL=$(dialog_uefi_entryname "${FREEBSD_BOOTLABEL}")
|
||||
FREEBSD_BOOTLABEL=$(dialog_uefi_entryname "${EFI_LABEL_NAME}")
|
||||
[ $? -eq $DIALOG_CANCEL ] && exit 1
|
||||
efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null
|
||||
}
|
||||
|
||||
f_dialog_title "Boot configuration"
|
||||
f_dialog_backtitle "FreeBSD Installer"
|
||||
f_dialog_backtitle "$OSNAME Installer"
|
||||
|
||||
if [ `uname -m` == powerpc ]; then
|
||||
platform=`sysctl -n hw.platform`
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@
|
|||
|
||||
test -f $BSDINSTALL_DISTDIR/MANIFEST || exit 0
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
|
||||
percentage=0
|
||||
for dist in $DISTRIBUTIONS; do
|
||||
distname=$(basename $dist .txz)
|
||||
|
|
@ -37,7 +40,7 @@ for dist in $DISTRIBUTIONS; do
|
|||
for i in $DISTRIBUTIONS; do
|
||||
items="$items $i `eval echo \\\${status_$(basename $i .txz):--11}`"
|
||||
done
|
||||
bsddialog --backtitle "FreeBSD Installer" --title "Checksum Verification" \
|
||||
bsddialog --backtitle "$OSNAME Installer" --title "Checksum Verification" \
|
||||
--mixedgauge "\nVerifying checksums of selected distributions.\n" \
|
||||
0 0 $percentage -- $items
|
||||
|
||||
|
|
@ -64,11 +67,11 @@ for dist in $DISTRIBUTIONS; do
|
|||
eval "status_$distname=-2"
|
||||
case $(/bin/freebsd-version -u) in
|
||||
*-ALPHA*|*-CURRENT|*-STABLE|*-PRERELEASE)
|
||||
bsddialog --backtitle "FreeBSD Installer" --title "Error" \
|
||||
bsddialog --backtitle "$OSNAME Installer" --title "Error" \
|
||||
--msgbox "The checksum for $dist does not match. It may have become corrupted, or it may be from a newer version of FreeBSD. Please check for a newer snapshot." 0 0
|
||||
;;
|
||||
*)
|
||||
bsddialog --backtitle "FreeBSD Installer" --title "Error" \
|
||||
bsddialog --backtitle "$OSNAME Installer" --title "Error" \
|
||||
--msgbox "The checksum for $dist does not match. It may have become corrupted, and should be redownloaded." 0 0
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -55,13 +55,13 @@ msg_bndoc_desc="Bengali Documentation"
|
|||
msg_cancel="Cancel"
|
||||
msg_dadoc_desc="Danish Documentation"
|
||||
msg_dedoc_desc="German Documentation"
|
||||
msg_docsinstall_menu_text="This menu allows you to install the whole documentation set from\nthe FreeBSD Documentation Project: Handbook, FAQ, and articles.\n\nPlease select the language versions you wish to install. At\nminimum, you should install the English version, the original\nversion of the documentation."
|
||||
msg_docsinstall_menu_text="This menu allows you to install the whole documentation set from\nthe $OSNAME Documentation Project: Handbook, FAQ, and articles.\n\nPlease select the language versions you wish to install. At\nminimum, you should install the English version, the original\nversion of the documentation."
|
||||
msg_eldoc_desc="Greek Documentation"
|
||||
msg_endoc_desc="English Documentation (recommended)"
|
||||
msg_esdoc_desc="Spanish Documentation"
|
||||
msg_frdoc_desc="French Documentation"
|
||||
msg_freebsd_documentation_installation="FreeBSD Documentation Installation"
|
||||
msg_freebsd_installer="FreeBSD Installer"
|
||||
msg_freebsd_documentation_installation="$OSNAME Documentation Installation"
|
||||
msg_freebsd_installer="$OSNAME Installer"
|
||||
msg_hudoc_desc="Hungarian Documentation"
|
||||
msg_itdoc_desc="Italian Documentation"
|
||||
msg_jadoc_desc="Japanese Documentation"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ else
|
|||
VERIFY_MANIFEST_SIG=1
|
||||
|
||||
# XXX actually verify signature on manifest
|
||||
bsddialog --backtitle "FreeBSD Installer" --title "Warning" --msgbox "Manifest not found on local disk and will be fetched from an unverified source. This is a potential security risk. If you do not wish to proceed, press control-C now." 0 0
|
||||
bsddialog --backtitle "$OSNAME Installer" --title "Warning" --msgbox "Manifest not found on local disk and will be fetched from an unverified source. This is a potential security risk. If you do not wish to proceed, press control-C now." 0 0
|
||||
fi
|
||||
|
||||
if [ ! -z "$LOCAL_DISTRIBUTIONS" ]; then
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
|
||||
: ${BSDDIALOG_OK=0}
|
||||
|
||||
echo -n > $BSDINSTALL_TMPETC/rc.conf.hardening
|
||||
|
|
@ -33,7 +36,7 @@ echo -n > $BSDINSTALL_TMPETC/sysctl.conf.hardening
|
|||
echo -n > $BSDINSTALL_TMPBOOT/loader.conf.hardening
|
||||
|
||||
exec 3>&1
|
||||
FEATURES=$( bsddialog --backtitle "FreeBSD Installer" \
|
||||
FEATURES=$( bsddialog --backtitle "$OSNAME Installer" \
|
||||
--title "System Hardening" --nocancel --separate-output \
|
||||
--checklist "Choose system security hardening options:" \
|
||||
0 0 0 \
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ f_include $BSDCFG_SHARE/dialog.subr
|
|||
#
|
||||
# Strings that should be moved to an i18n file and loaded with f_include_lang()
|
||||
#
|
||||
msg_freebsd_installer="FreeBSD Installer"
|
||||
msg_freebsd_installer="$OSNAME Installer"
|
||||
msg_ok="OK"
|
||||
msg_please_choose_a_hostname="Please choose a hostname for this machine.\n\nIf you are running on a managed network, please ask\nyour network administrator for an appropriate name."
|
||||
msg_set_hostname="Set Hostname"
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ error() {
|
|||
if [ -n "$1" ]; then
|
||||
msg="$1\n\n"
|
||||
fi
|
||||
bsddialog --backtitle "FreeBSD Installer" --title "Abort" \
|
||||
bsddialog --backtitle "$OSNAME 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 $BSDDIALOG_OK ]; then
|
||||
|
|
@ -84,7 +84,7 @@ if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
|
|||
then
|
||||
exec 3>&1
|
||||
EXTRA_DISTS=$(echo $DISTMENU | xargs -o bsddialog \
|
||||
--backtitle "FreeBSD Installer" \
|
||||
--backtitle "$OSNAME Installer" \
|
||||
--title "Distribution Select" --no-cancel --separate-output \
|
||||
--checklist "Choose optional system components to install:" \
|
||||
0 0 0 \
|
||||
|
|
@ -130,7 +130,7 @@ if [ ! "$nonInteractive" == "YES" ]
|
|||
then
|
||||
bsdinstall services
|
||||
|
||||
bsddialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \
|
||||
bsddialog --backtitle "$OSNAME Installer" --title "Add User Accounts" --yesno \
|
||||
"Would you like to add users to the installed system now?" 0 0 && \
|
||||
bsdinstall adduser
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ 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_freebsd_installer="$OSNAME Installer"
|
||||
msg_keymap_menu_text="The system console driver for $OSNAME defaults to standard \"US\"\nkeyboard map. Other keymaps can be chosen below."
|
||||
msg_keymap_selection="Keymap Selection"
|
||||
msg_ok="OK"
|
||||
msg_select="Select"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
|
||||
: ${BSDDIALOG_OK=0}
|
||||
: ${BSDDIALOG_CANCEL=1}
|
||||
: ${BSDDIALOG_HELP=2}
|
||||
|
|
@ -34,7 +37,7 @@
|
|||
: ${BSDDIALOG_ERROR=255}
|
||||
|
||||
exec 3>&1
|
||||
MIRROR=`bsddialog --backtitle "FreeBSD Installer" \
|
||||
MIRROR=`bsddialog --backtitle "$OSNAME 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 16 \
|
||||
|
|
@ -164,9 +167,9 @@ $BSDDIALOG_OK)
|
|||
;;
|
||||
$BSDDIALOG_EXTRA)
|
||||
exec 3>&1
|
||||
BSDINSTALL_DISTSITE=`bsddialog --backtitle "FreeBSD Installer" \
|
||||
BSDINSTALL_DISTSITE=`bsddialog --backtitle "$OSNAME Installer" \
|
||||
--title "Mirror Selection" \
|
||||
--inputbox "Please enter the URL to an alternate FreeBSD mirror:" \
|
||||
--inputbox "Please enter the URL to an alternate $OSNAME mirror:" \
|
||||
0 74 "$BSDINSTALL_DISTSITE" 2>&1 1>&3`
|
||||
MIRROR_BUTTON=$?
|
||||
exec 3>&-
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
|
||||
TMP_FSTAB=${TMPDIR:-"/tmp"}/bsdinstall-tmp-fstab
|
||||
|
||||
cat $PATH_FSTAB | awk -v BSDINSTALL_CHROOT=$BSDINSTALL_CHROOT '{
|
||||
|
|
@ -44,7 +47,7 @@ for i in $FILESYSTEMS; do
|
|||
mkdir -p $i 2>/dev/null
|
||||
MNTERROR=`mount -F $TMP_FSTAB $i 2>&1`
|
||||
if [ $? -ne 0 ]; then
|
||||
bsddialog --backtitle "FreeBSD Installer" --title "Error" \
|
||||
bsddialog --backtitle "$OSNAME Installer" --title "Error" \
|
||||
--msgbox "Error mounting partition $i:\n$MNTERROR" 0 0
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
|
||||
INTERFACES=""
|
||||
BSDDIALOG_ITEMS=""
|
||||
|
||||
|
|
@ -63,14 +66,14 @@ for IF in $INTERFACES; do
|
|||
done
|
||||
|
||||
if [ -z "$INTERFACES" ]; then
|
||||
bsddialog --backtitle 'FreeBSD Installer' \
|
||||
bsddialog --backtitle "$OSNAME Installer" \
|
||||
--title 'Network Configuration Error' \
|
||||
--msgbox 'No network interfaces present to configure.' 0 0
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec 3>&1
|
||||
INTERFACE=`echo $BSDDIALOG_ITEMS | xargs -o bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3`
|
||||
INTERFACE=`echo $BSDDIALOG_ITEMS | xargs -o bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3`
|
||||
if [ $? -eq $BSDDIALOG_CANCEL ]; then exit 1; fi
|
||||
exec 3>&-
|
||||
|
||||
|
|
@ -101,7 +104,7 @@ case $? in
|
|||
esac
|
||||
|
||||
if [ ${IPV4_AVAIL} -eq 1 ]; then
|
||||
bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
|
||||
bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \
|
||||
--yesno 'Would you like to configure IPv4 for this interface?' 0 0
|
||||
if [ $? -eq $BSDDIALOG_OK ]; then
|
||||
bsdinstall netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" || \
|
||||
|
|
@ -116,7 +119,7 @@ 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
|
||||
bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
|
||||
bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \
|
||||
--yesno 'Would you like to configure IPv6 for this interface?' 0 0
|
||||
if [ $? -eq $BSDDIALOG_OK ]; then
|
||||
bsdinstall netconfig_ipv6 ${INTERFACE} || exec $0
|
||||
|
|
@ -181,7 +184,7 @@ else
|
|||
fi
|
||||
|
||||
exec 3>&1
|
||||
RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle 'FreeBSD Installer' \
|
||||
RESOLV=$(echo "${RESOLV}" | xargs -o bsddialog --backtitle "$OSNAME Installer" \
|
||||
--title 'Network Configuration' \
|
||||
--mixedform 'Resolver Configuration' 0 0 0 \
|
||||
2>&1 1>&3)
|
||||
|
|
|
|||
|
|
@ -43,24 +43,24 @@ INTERFACE=$1
|
|||
IFCONFIG_PREFIX="$2"
|
||||
test -z "$IFCONFIG_PREFIX" || IFCONFIG_PREFIX="$2 "
|
||||
case "${INTERFACE}" in
|
||||
"") bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
|
||||
"") bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \
|
||||
--msgbox 'No interface specified for IPv4 configuration.' 0 0
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0
|
||||
bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0
|
||||
if [ $? -eq $BSDDIALOG_OK ]; then
|
||||
if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
|
||||
# XXX: get interface down otherwise after installation restart
|
||||
# dhclient does not build a new resolv.conf (see PR262262).
|
||||
ifconfig $INTERFACE down
|
||||
ifconfig $INTERFACE up
|
||||
bsddialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0
|
||||
bsddialog --backtitle "$OSNAME Installer" --infobox "Acquiring DHCP lease..." 0 0
|
||||
err=$( pkill -F /var/run/dhclient/dhclient.${INTERFACE}.pid; dhclient $INTERFACE 2>&1 )
|
||||
if [ $? -ne 0 ]; then
|
||||
f_dprintf "%s" "$err"
|
||||
bsddialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0
|
||||
bsddialog --backtitle "$OSNAME Installer" --msgbox "DHCP lease acquisition failed." 0 0
|
||||
exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -73,7 +73,7 @@ NETMASK=`ifconfig $INTERFACE inet | awk '/inet/ {printf("%s\n", $4); }'`
|
|||
ROUTER=`netstat -rn -f inet | awk '/default/ {printf("%s\n", $2);}'`
|
||||
|
||||
exec 3>&1
|
||||
IF_CONFIG=$(bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --form 'Static Network Interface Configuration' 0 0 0 \
|
||||
IF_CONFIG=$(bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' --form 'Static Network Interface Configuration' 0 0 0 \
|
||||
'IP Address' 1 1 "$IP_ADDRESS" 1 20 16 0 \
|
||||
'Subnet Mask' 2 1 "$NETMASK" 2 20 16 0 \
|
||||
'Default Router' 3 1 "$ROUTER" 3 20 16 0 \
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ f_include $BSDCFG_SHARE/dialog.subr
|
|||
|
||||
INTERFACE=$1
|
||||
case "${INTERFACE}" in
|
||||
"") bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
|
||||
"") bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \
|
||||
--msgbox 'No interface specified for IPv6 configuration.' 0 0
|
||||
exit 1
|
||||
;;
|
||||
|
|
@ -59,17 +59,17 @@ esac
|
|||
AGAIN=""
|
||||
while : ; do
|
||||
MSG="Would you like to try stateless address autoconfiguration (SLAAC)${AGAIN}?"
|
||||
bsddialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
|
||||
bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \
|
||||
--yesno "${MSG}" 0 0
|
||||
if [ $? -eq $BSDDIALOG_OK ]; then
|
||||
if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
|
||||
bsddialog --backtitle 'FreeBSD Installer' \
|
||||
bsddialog --backtitle "$OSNAME Installer" \
|
||||
--infobox "Sending Router Solicitation ..." 0 0
|
||||
ifconfig ${INTERFACE} inet6 -ifdisabled accept_rtadv up
|
||||
err=$( rtsol -F $INTERFACE 2>&1 )
|
||||
if [ $? -ne 0 ]; then
|
||||
f_dprintf "%s" "$err"
|
||||
bsddialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0
|
||||
bsddialog --backtitle "$OSNAME Installer" --msgbox "SLAAC failed." 0 0
|
||||
AGAIN=" again"
|
||||
continue
|
||||
fi
|
||||
|
|
@ -109,7 +109,7 @@ END {
|
|||
}'`
|
||||
|
||||
exec 3>&1
|
||||
IF_CONFIG=$(echo ${ADDRS} | xargs -o bsddialog --backtitle 'FreeBSD Installer' \
|
||||
IF_CONFIG=$(echo ${ADDRS} | xargs -o bsddialog --backtitle "$OSNAME Installer" \
|
||||
--title 'Network Configuration' \
|
||||
--mixedform 'Static IPv6 Network Interface Configuration' 0 0 0 \
|
||||
2>&1 1>&3)
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
clear
|
||||
echo "FreeBSD Installer"
|
||||
echo "$OSNAME Installer"
|
||||
echo "========================"
|
||||
echo
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
|
||||
: ${BSDDIALOG_OK=0}
|
||||
|
||||
if [ -f $BSDINSTALL_TMPETC/rc.conf.services ]; then
|
||||
|
|
@ -39,7 +42,7 @@ fi
|
|||
echo -n > $BSDINSTALL_TMPETC/rc.conf.services
|
||||
|
||||
exec 3>&1
|
||||
DAEMONS=$( bsddialog --backtitle "FreeBSD Installer" \
|
||||
DAEMONS=$( bsddialog --backtitle "$OSNAME Installer" \
|
||||
--title "System Configuration" --no-cancel --separate-output \
|
||||
--checklist "Choose the services you would like to be started at boot:" \
|
||||
0 0 0 \
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
#
|
||||
# $FreeBSD$
|
||||
|
||||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
|
||||
# Select timezone
|
||||
chroot $BSDINSTALL_CHROOT tzsetup
|
||||
|
||||
|
|
@ -36,7 +39,7 @@ export TZ
|
|||
|
||||
# Set date
|
||||
exec 3>&1
|
||||
DATE=$(bsddialog --backtitle 'FreeBSD Installer' \
|
||||
DATE=$(bsddialog --backtitle "$OSNAME Installer" \
|
||||
--title 'Time & Date' \
|
||||
--ok-label 'Set Date' \
|
||||
--cancel-label 'Skip' \
|
||||
|
|
@ -48,7 +51,7 @@ exec 3>&-
|
|||
|
||||
# Set time
|
||||
exec 3>&1
|
||||
TIME=$(bsddialog --backtitle 'FreeBSD Installer' \
|
||||
TIME=$(bsddialog --backtitle "$OSNAME Installer" \
|
||||
--title 'Time & Date' \
|
||||
--ok-label 'Set Time' \
|
||||
--cancel-label 'Skip' \
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
BSDCFG_SHARE="/usr/share/bsdconfig"
|
||||
. $BSDCFG_SHARE/common.subr || exit 1
|
||||
f_include $BSDCFG_SHARE/dialog.subr
|
||||
f_dialog_backtitle "FreeBSD Installer"
|
||||
f_dialog_backtitle "$OSNAME Installer"
|
||||
|
||||
############################################################ FUNCTIONS
|
||||
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
|
|||
msg_error="Error"
|
||||
msg_force_4k_sectors="Force 4K Sectors?"
|
||||
msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.min_auto_ashift=12"
|
||||
msg_freebsd_installer="FreeBSD Installer"
|
||||
msg_freebsd_installer="$OSNAME Installer"
|
||||
msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted"
|
||||
msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk"
|
||||
msg_install="Install"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue