Fix some unbound variables

This commit is contained in:
natemaia 2018-07-27 20:54:09 -07:00
parent fe90bf1d67
commit dec5a7b900
2 changed files with 9 additions and 11 deletions

View File

@ -13,12 +13,9 @@
# set -v
# immutable variables {
# essentially constants, these won't ever change during runtime
# export TERM='xterm-256color'
readonly DIST="Archlabs" # Linux distributor
readonly VER="1.6.7" # Installer version
readonly VER="1.6.8" # Installer version
readonly LIVE="liveuser" # Live session user name
readonly TRN="/installer" # Translation path
readonly MNT="/mnt/install" # Install mountpoint
@ -135,6 +132,7 @@ initialize_variables() {
declare -g UNPACKED_BASE=false
declare -g SET_ROOT_PASSWD=false
declare -g TIMEZONE_SET=false
declare -g DONE_UPDATE=false
declare -g BOOT_DONE=false
declare -g FULL_DONE=false
declare -g CONFIRM_DONE=false
@ -1062,7 +1060,7 @@ select_root_partition() {
fi
select_filesystem "$ROOT_PART" || { ROOT_PART=""; return 1; }
mount_partition "$ROOT_PART" || { ROOT_PART=""; return 1; }
mount_partition "$ROOT_PART" "" || { ROOT_PART=""; return 1; }
return 0
}
@ -1521,7 +1519,7 @@ lvm_extra_lvs() {
lvm_volume_count() {
VOL_COUNT=$(dialog --cr-wrap --stdout --backtitle "$BT" --title " $_LvmCreateVG " \
--radiolist "$_LvmLvNumBody1 '$VOLUME_GROUP'.\n$_LvmLvNumBody2" 0 0 0 \
--radiolist "$_LvmLvNumBody1 $VOLUME_GROUP\n$_LvmLvNumBody2" 0 0 0 \
"1" "-" off "2" "-" off "3" "-" off "4" "-" off "5" "-" off "6" "-" off "7" "-" off "8" "-" off "9" "-" off)
[[ $? != 0 || $VOL_COUNT == "" ]] && return 1
return 0
@ -1567,7 +1565,7 @@ lvm_create() {
fi
# finished volume group creation
msgbox "$_LvmCreateVG" "$_LvmPvDoneBody1 '$VOLUME_GROUP' ($VOL_GROUP_SIZE $VOL_GROUP_SIZE_TYPE) $_LvmPvDoneBody2\n"
msgbox "$_LvmCreateVG" "$_LvmPvDoneBody1 $VOLUME_GROUP ($VOL_GROUP_SIZE $VOL_GROUP_SIZE_TYPE) $_LvmPvDoneBody2\n"
tput civis
# how many logical volumes
@ -1577,7 +1575,7 @@ lvm_create() {
lvm_extra_lvs || return 1
# last or only logical volume
lvm_volume_name "$_LvmLvNameBody1 $_LvmLvNameBody2 (${VOL_GROUP_MB}MB)." || return 1
lvm_volume_name "$_LvmLvNameBody1 $_LvmLvNameBody2 (${VOL_GROUP_MB}MB)" || return 1
# create it
lvcreate -l +100%FREE "$VOLUME_GROUP" -n "$VOLUME_NAME" 2>$ERR

View File

@ -212,14 +212,14 @@ _LvmDetBody="\nExisting logical volume management (LVM) detected.\n\nActivating,
_LvmNameVgBody="Enter the name of the volume group (VG) to create.\n\nThe VG is the new virtual device to create out of the partition(s) selected."
_LvmPvSelBody="Select the partition(s) to use for the physical volume (PV)."
_LvmPvConfBody1="\nConfirm creation of volume group:"
_LvmPvConfBody2="with the following partitions:\n"
_LvmPvConfBody2="With the following partition(s):"
_LvmPvActBody1="\nCreating and activating volume group:"
_LvmPvDoneBody1="\nvolume group:"
_LvmPvDoneBody1="\nVolume group:"
_LvmPvDoneBody2="has been created"
_LvmLvNumBody1="\nUse [Spacebar] to select the number of logical volumes (LVs) to create in:"
_LvmLvNumBody2="\nThe last (or only) logical volume will automatically use all remaining space in the volume group."
_LvmLvNameBody1="Enter the name of the logical volume (LV) to create.\n\nThis is like setting a name or label for a partition.\n"
_LvmLvNameBody2="\nNOTE: This logical volume will automatically use up all space remaining on the volume group:"
_LvmLvNameBody2="\nNOTE: This logical volume will use up all remaining space in the volume group"
_LvmLvSizeBody1="remaining"
_LvmLvSizeBody2="\n\nEnter the size of the logical volume (LV) in megabytes (M) or gigabytes (G). For example, 100M will create a 100 megabyte LV. 10G will create a 10 Gigabyte LV.\n"
_LvmCompBody="\nDone! all logical volumes have been created for the volume group.\n\nDo you want to view the device tree for the new LVM scheme?\n"