aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>2014-05-15 02:37:59 +0000
committerOllivier Robert <roberto@FreeBSD.org>2014-05-15 02:37:59 +0000
commit695a612f671ceca4ac442e40c624fda299a114b7 (patch)
tree01b7abcdc5d23a08fa4c3bb8e7e69f2ed95ced0c /usr.sbin
parented8690e36be3720368fc11fb54aabcdb2252b5f0 (diff)
downloadsrc-695a612f671ceca4ac442e40c624fda299a114b7.tar.gz
src-695a612f671ceca4ac442e40c624fda299a114b7.zip
Fix the "disks" variable reuse.
It starts off being used to track the grammar for the number of disks (singular vs plural) and then it is reused as the list of available disks. Replace the variable with disks_grammar and move 'disk' and 'disks' to msg_ vars so they can be translated in the future. Submitted by: Allan Jude <freebsd@allanjude.com> Reviewed by: roberto MFC after: 2 weeks Sponsored by: ScaleEngine Inc.
Notes
Notes: svn path=/head/; revision=266109
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/zfsboot9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
index 2cdad3c3b25c..3ef88bf641b0 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -220,6 +220,8 @@ msg_configure_options="Configure Options:"
msg_detailed_disk_info="gpart(8) show %s:\n%s\n\ncamcontrol(8) inquiry %s:\n%s\n\n\ncamcontrol(8) identify %s:\n%s\n"
msg_disk_info="Disk Info"
msg_disk_info_help="Get detailed information on disk device(s)"
+msg_disk_singular="disk"
+msg_disk_plural="disks"
msg_encrypt_disks="Encrypt Disks?"
msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
msg_error="Error"
@@ -306,13 +308,14 @@ dialog_menu_main()
[ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes"
[ "$ZFSBOOT_SWAP_ENCRYPTION" ] && swapgeli="$msg_yes"
[ "$ZFSBOOT_SWAP_MIRROR" ] && swapmirror="$msg_yes"
- local disks n
+ local disks n disks_grammar
f_count n $ZFSBOOT_DISKS
- { [ $n -eq 1 ] && disks=disk; } || disks=disks # grammar
+ { [ $n -eq 1 ] && disks_grammar=$msg_disk_singular; } ||
+ disks_grammar=$msg_disk_plural # grammar
local menu_list="
'>>> $msg_install' '$msg_install_desc'
'$msg_install_help'
- 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks'
+ 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks_grammar'
'$msg_pool_type_disks_help'
'- $msg_rescan_devices' '*'
'$msg_rescan_devices_help'