From nobody Tue May 24 15:50:11 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5A57A1AEA6B3; Tue, 24 May 2022 15:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L6zDM1zcrz4tr4; Tue, 24 May 2022 15:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653407411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oqw8N/DQ/Op62nGodDMzB/fPAO+VhxUTUeXtqG3V7Zc=; b=J4tIwTiRB6A/Ri0URLNLShwa1MJl0p9J5FgdFPxKzSbGQOH9v2rukfpxmGmIKHK30P7zYo RyJBf5o2V60QegUgdpnrKq17cUXk9IHrOBw8t5PwHahk9x8Jn6ETv8BsgVmqEnpBXW94pF mB1gKy2yzQmHx31923w3wOmAR88yv9gXauqWOML+/9a+9Wdet485l3xQvrK+WjvulwQUKZ PVHSPgLP/AOU375cWSwEoGT/hFHHJrNF3HKAVXP600m4Zs4NTczx5+dyoonDE4HhWnBUCU ShSjLSHdYn7nhl12W4YvYJS5zwVrBfpTCg4eCIem7CTjAMkvr1InnbgjBJQqbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2403B26FDC; Tue, 24 May 2022 15:50:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24OFoBoj018968; Tue, 24 May 2022 15:50:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24OFoBcA018964; Tue, 24 May 2022 15:50:11 GMT (envelope-from git) Date: Tue, 24 May 2022 15:50:11 GMT Message-Id: <202205241550.24OFoBcA018964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: cc42ef532896 - main - bsdinstall: allow whitelabeling the scripts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc42ef5328963ee55c3305b136e9a86145f24594 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653407411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oqw8N/DQ/Op62nGodDMzB/fPAO+VhxUTUeXtqG3V7Zc=; b=veUiFYuwZEtEU9ld4a8uY4us0yXffjlUg5/Ge+rohOl4MmidaAkX5tcN1Q0BJe/kK0Muxa ZsKCxWPFrHuJv9dDr0140+YT/WpKrjhImTTEq5roxQEcC8/opvMJz0pw5aT1JHxVvk07oc RIvHn4kk8WENZZNg3PBQXDw6gXQnoPTWqIkmxe/ibEvvMprNtMk/NPWH9bjgIXXGcalmau oyxlBaajDyjAxWT+EP6JD4equoLu15p6SMwyjRcXAkLZWNKtomWy072rH3NFuas+SEviYF f2wNanADFIdHZ/Tk361u0W5xctzfH/FNWAgcoS6nn0emDOUbs4iaN/ieFz7Eig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653407411; a=rsa-sha256; cv=none; b=bVOdL3b4hjDWAkYOz2IFaPy7iTgFtUm7u+Yk9WYjjoPgZlsbrrH7CdT55b0u1UMcShPG/8 SKnL9t/5fB7rq7j1n4p4qS48IJODBlXcct+UgsIcxXAqthQbuG9P901xvNZaNCm62q+qG+ cNOaKJIEFqI4p7fLz+5JZUWHZa59f/ZF38sI7LXb7tFxhhT4fFRr2qnFi3vS2PnGSlilGV XoRML/+Q8qpYZKX+0QOaalseNEg9TCpERr4l2nSEzxShCHqX4PcM0vumzAWObCv74n3/NT xoyIrY6pIkf5Nachv/ruXOhhV0RTJOdMfQ+J3t2/j2sbgpDdIL1Bm45lYz7gGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=cc42ef5328963ee55c3305b136e9a86145f24594 commit cc42ef5328963ee55c3305b136e9a86145f24594 Author: Brad Davis AuthorDate: 2022-05-24 15:49:06 +0000 Commit: Brad Davis CommitDate: 2022-05-24 15:49:06 +0000 bsdinstall: allow whitelabeling the scripts Approved by: allanjude, asiciliano Differential Revision: https://reviews.freebsd.org/D35197 Sponsored by: Rubicon Communications, LLC ("Netgate") --- usr.sbin/bsdconfig/share/common.subr | 6 ++++++ usr.sbin/bsdinstall/scripts/adduser | 5 ++++- usr.sbin/bsdinstall/scripts/auto | 18 +++++++++--------- usr.sbin/bsdinstall/scripts/bootconfig | 18 ++++++++---------- usr.sbin/bsdinstall/scripts/checksum | 9 ++++++--- usr.sbin/bsdinstall/scripts/docsinstall | 6 +++--- usr.sbin/bsdinstall/scripts/fetchmissingdists | 2 +- usr.sbin/bsdinstall/scripts/hardening | 5 ++++- usr.sbin/bsdinstall/scripts/hostname | 2 +- usr.sbin/bsdinstall/scripts/jail | 6 +++--- usr.sbin/bsdinstall/scripts/keymap | 4 ++-- usr.sbin/bsdinstall/scripts/mirrorselect | 9 ++++++--- usr.sbin/bsdinstall/scripts/mount | 5 ++++- usr.sbin/bsdinstall/scripts/netconfig | 13 ++++++++----- usr.sbin/bsdinstall/scripts/netconfig_ipv4 | 10 +++++----- usr.sbin/bsdinstall/scripts/netconfig_ipv6 | 10 +++++----- usr.sbin/bsdinstall/scripts/rootpass | 4 +++- usr.sbin/bsdinstall/scripts/services | 5 ++++- usr.sbin/bsdinstall/scripts/time | 7 +++++-- usr.sbin/bsdinstall/scripts/wlanconfig | 2 +- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 21 files changed, 89 insertions(+), 59 deletions(-) diff --git a/usr.sbin/bsdconfig/share/common.subr b/usr.sbin/bsdconfig/share/common.subr index 49b9186f548f..fe403f045db3 100644 --- a/usr.sbin/bsdconfig/share/common.subr +++ b/usr.sbin/bsdconfig/share/common.subr @@ -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 # diff --git a/usr.sbin/bsdinstall/scripts/adduser b/usr.sbin/bsdinstall/scripts/adduser index 456f76b04319..9d1e95ec0cd9 100755 --- a/usr.sbin/bsdinstall/scripts/adduser +++ b/usr.sbin/bsdinstall/scripts/adduser @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 9f8946880f61..7398f382273c 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 2a418d786643..cb641beaa89e 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -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` diff --git a/usr.sbin/bsdinstall/scripts/checksum b/usr.sbin/bsdinstall/scripts/checksum index 0bb0dd512d31..003ef608254d 100755 --- a/usr.sbin/bsdinstall/scripts/checksum +++ b/usr.sbin/bsdinstall/scripts/checksum @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/docsinstall b/usr.sbin/bsdinstall/scripts/docsinstall index cb1f1e1858ad..c24941658a88 100755 --- a/usr.sbin/bsdinstall/scripts/docsinstall +++ b/usr.sbin/bsdinstall/scripts/docsinstall @@ -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" diff --git a/usr.sbin/bsdinstall/scripts/fetchmissingdists b/usr.sbin/bsdinstall/scripts/fetchmissingdists index 97a108de1e11..a553eacd00c9 100644 --- a/usr.sbin/bsdinstall/scripts/fetchmissingdists +++ b/usr.sbin/bsdinstall/scripts/fetchmissingdists @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/hardening b/usr.sbin/bsdinstall/scripts/hardening index 065241ef8b25..4ee738fe0166 100755 --- a/usr.sbin/bsdinstall/scripts/hardening +++ b/usr.sbin/bsdinstall/scripts/hardening @@ -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 \ diff --git a/usr.sbin/bsdinstall/scripts/hostname b/usr.sbin/bsdinstall/scripts/hostname index 23adbe68ead0..eff2bc28e586 100755 --- a/usr.sbin/bsdinstall/scripts/hostname +++ b/usr.sbin/bsdinstall/scripts/hostname @@ -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" diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index 849016ac0f3d..97460d92034a 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/keymap b/usr.sbin/bsdinstall/scripts/keymap index 739d0223c4f4..691e5221953f 100755 --- a/usr.sbin/bsdinstall/scripts/keymap +++ b/usr.sbin/bsdinstall/scripts/keymap @@ -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" diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect index a80b9282cbd0..a613a097e69a 100755 --- a/usr.sbin/bsdinstall/scripts/mirrorselect +++ b/usr.sbin/bsdinstall/scripts/mirrorselect @@ -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>&- diff --git a/usr.sbin/bsdinstall/scripts/mount b/usr.sbin/bsdinstall/scripts/mount index 9b3e00f58e7a..2d7ce14fe045 100755 --- a/usr.sbin/bsdinstall/scripts/mount +++ b/usr.sbin/bsdinstall/scripts/mount @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig index 11ee646c403d..c5b41dcdef6a 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -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) diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 index e0e540188aba..b3d6c23d8d77 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 @@ -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 \ diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 index d915727a8610..1a360e00f306 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 @@ -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) diff --git a/usr.sbin/bsdinstall/scripts/rootpass b/usr.sbin/bsdinstall/scripts/rootpass index 7764a51b62fb..308c60e47a4c 100755 --- a/usr.sbin/bsdinstall/scripts/rootpass +++ b/usr.sbin/bsdinstall/scripts/rootpass @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/services b/usr.sbin/bsdinstall/scripts/services index 1ac69fa63b2d..f18f65b2afb0 100755 --- a/usr.sbin/bsdinstall/scripts/services +++ b/usr.sbin/bsdinstall/scripts/services @@ -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 \ diff --git a/usr.sbin/bsdinstall/scripts/time b/usr.sbin/bsdinstall/scripts/time index c9eb32b2469f..5715ab2d9d4e 100755 --- a/usr.sbin/bsdinstall/scripts/time +++ b/usr.sbin/bsdinstall/scripts/time @@ -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' \ diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 3de1a3420909..eea31ad093bb 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -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 diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index ab2cfba04d29..56af9eccd78b 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -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"