Changeset View
Standalone View
usr.sbin/bsdinstall/scripts/auto
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
msg_exit="Exit" | msg_exit="Exit" | ||||
msg_freebsd_installer="FreeBSD Installer" | msg_freebsd_installer="FreeBSD 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_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_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_an_installation_step_has_been_aborted="An installation step has been aborted. Would you like\nto restart the installation or exit the installer?" | msg_an_installation_step_has_been_aborted="An installation step has been aborted. Would you like\nto restart the installation or exit the installer?" | ||||
msg_no="NO" | msg_no="NO" | ||||
msg_restart="Restart" | msg_restart="Restart" | ||||
msg_yes="YES" | msg_yes="YES" | ||||
msg_partitioning_zfs="Auto (ZFS)" | |||||
msg_partitioning_zfs_desc="Guided Root-on-ZFS" | |||||
msg_partitioning_zfs_help="ZFS is recommended if you have at least 4GB RAM" | |||||
msg_partitioning_ufs="Auto (UFS)" | |||||
msg_partitioning_ufs_desc="Guided Disk Setup" | |||||
rgrimes: To be more uniform could this be "Guided UFS Disk Setup" as the zfs desc above explicity… | |||||
msg_partitioning_ufs_help="UFS is recommended if you have less than 4GB of RAM" | |||||
msg_partitioning_manual="Manual" | |||||
msg_partitioning_manual_desc="Manual Disk Setup (experts)" | |||||
msg_partitioning_manual_help="Create customized partitions from menu options" | |||||
msg_partitioning_shell="Shell" | |||||
msg_partitioning_shell_desc="Open a shell and partition by hand" | |||||
msg_partitioning_shell_help="Create customized partitions using command-line utilities" | |||||
Done Inline ActionsThe variable names here need to be adjusted. msg_partititoning_zfs="Auto (ZFS)" For example should be: msg_auto_zfs="Auto (ZFS)" So that when used in code, the code reads like the text. Also, when searching the code, one can prepend "msg_", change to lower-case, and replace non-printable characters and spaces into underscore to find uses of the text. Also, should the text be re-usable elsewhere, it is not tied to the partitioning menu. This is so that when someone performs international translation, fewer translations have to be made. For example, there is no reason to have: msg_partitioning_shell="Shell" When the following will do: msg_shell="Shell" Which makes any singular occurrence of the word "Shell" accessible under the "msg_shell" variable. Unnecessarily localizing individual words and phrases to a particular dialog, function, or module creates duplication and extra work for translators. dteske: The variable names here need to be adjusted.
```
msg_partititoning_zfs="Auto (ZFS)"
```
For… | |||||
############################################################ FUNCTIONS | ############################################################ FUNCTIONS | ||||
# error [$msg] | # error [$msg] | ||||
# | # | ||||
# Display generic error message when a script fails. An optional message | # Display generic error message when a script fails. An optional message | ||||
# argument can preceed the generic message. User is given the choice of | # argument can preceed the generic message. User is given the choice of | ||||
# restarting the installer or exiting. | # restarting the installer or exiting. | ||||
▲ Show 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | "Veriton M6630G") | ||||
export WORKAROUND_GPTACTIVE=1 | export WORKAROUND_GPTACTIVE=1 | ||||
fi | fi | ||||
;; | ;; | ||||
esac | esac | ||||
;; | ;; | ||||
esac | esac | ||||
fi | fi | ||||
PMODES="\ | PMODES=" | ||||
\"Auto (UFS)\" \"Guided Disk Setup\" \ | '$msg_partitioning_ufs' '$msg_partitioning_ufs_desc' '$msg_partitioning_ufs_help' | ||||
Manual \"Manual Disk Setup (experts)\" \ | '$msg_partitioning_manual' '$msg_partitioning_manual_desc' '$msg_partitioning_manual_help' | ||||
Shell \"Open a shell and partition by hand\"" | '$msg_partitioning_shell' '$msg_partitioning_shell_desc' '$msg_partitioning_shell_help' | ||||
" # END-QUOTE | |||||
CURARCH=$( uname -m ) | CURARCH=$( uname -m ) | ||||
case $CURARCH in | case $CURARCH in | ||||
amd64|arm64|i386) # Booting ZFS Supported | amd64|arm64|i386) # Booting ZFS Supported | ||||
PMODES="\"Auto (ZFS)\" \"Guided Root-on-ZFS\" $PMODES" | PMODES=" | ||||
'$msg_partitioning_zfs' '$msg_partitioning_zfs_desc' '$msg_partitioning_zfs_help' | |||||
$PMODES | |||||
" # END-QUOTE | |||||
;; | ;; | ||||
*) # Booting ZFS Unspported | *) # Booting ZFS Unsupported | ||||
;; | ;; | ||||
esac | esac | ||||
exec 3>&1 | exec 3>&1 | ||||
PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \ | PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \ | ||||
--title "Partitioning" \ | --title "Partitioning" \ | ||||
--item-help \ | |||||
--menu "How would you like to partition your disk?" \ | --menu "How would you like to partition your disk?" \ | ||||
0 0 0 2>&1 1>&3` || exit 1 | 0 0 0 2>&1 1>&3` || exit 1 | ||||
exec 3>&- | exec 3>&- | ||||
case "$PARTMODE" in | case "$PARTMODE" in | ||||
"Auto (ZFS)") # ZFS | "Auto (ZFS)") # ZFS | ||||
bsdinstall zfsboot || error "ZFS setup failed" | bsdinstall zfsboot || error "ZFS setup failed" | ||||
bsdinstall mount || error "Failed to mount filesystem" | bsdinstall mount || error "Failed to mount filesystem" | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |
To be more uniform could this be "Guided UFS Disk Setup" as the zfs desc above explicity mentions ZFS too.