Fix: btrfs_subvols passing invalid arguments to part_mntopts
This commit is contained in:
parent
3e4e965763
commit
fb3803f3fd
16
installer
16
installer
@ -275,7 +275,7 @@ declare -A LOGIN_PKGS=(
|
||||
|
||||
# extras installed for user selected packages {
|
||||
# if a package requires additional packages that aren't already dependencies
|
||||
# they can be added here eg. [package]="extra"
|
||||
# they can be added here e.g. [package]="extra"
|
||||
declare -A PKG_EXT=(
|
||||
[bluez]='bluez-libs bluez-utils bluez-tools bluez-plugins bluez-hid2hci'
|
||||
[cairo-dock]='cairo-dock-plug-ins'
|
||||
@ -302,18 +302,18 @@ _device="\nSelect a device to use from the list below.\n\nDevices (/dev) are the
|
||||
_mount="\nUse [Space] to toggle mount options from below, press [Enter] when done to confirm selection.\n\nNot selecting any and confirming will run an automatic mount."
|
||||
_warn="\nIMPORTANT: Choose carefully when editing, formatting, and mounting partitions or your DATA MAY BE LOST.\n\nTo mount a partition without formatting it, select 'skip' when prompted to choose a file system during the mounting stage.\nThis can only be used for partitions that already contain a file system and cannot be the root (/) partition, it needs to be formatted before install.\n"
|
||||
_part="\nFull device auto partitioning is available for beginners otherwise cfdisk is recommended.\n\n - All systems will require a root partition (8G or greater).\n - UEFI or BIOS using LUKS without LVM require a separate boot partition (100-512M)."
|
||||
_btrfs="\nBtrfs can be used with or without the use of subvolumes.\n\nAn initial subvolume will be created and mounted with additional subvolumes branching from this created after.\n\nUse subvolumes?\n"
|
||||
_btrfs="\nBtrfs can be used with or without creating subvolumes.\n\nAn initial subvolume will be created and mounted with additional subvolumes branching from this created after.\n\nCreate subvolumes?\n"
|
||||
_uefi="\nSelect the EFI boot partition (/boot), required for UEFI boot.\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as vfat/fat32 if not already."
|
||||
_bios="\nDo you want to use a separate boot partition? (optional)\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as ext3/4 if not already."
|
||||
_biosluks="\nSelect the boot partition (/boot), required for LUKS.\n\nIt's usually the first partition on the device, 100-512M, and will be formatted as ext3/4 if not already."
|
||||
_format="is already formatted correctly.\n\nFor a clean install, existing partitions should be formatted, however this removes ALL data (bootloaders) on the partition so choose carefully.\n\nDo you want to format the partition?\n"
|
||||
_swapsize="\nEnter the size of the swapfile in megabytes (M) or gigabytes (G).\n\neg. 100M will create a 100 megabyte swapfile, while 10G will create a 10 gigabyte swapfile.\n\nFor ease of use and as an example it is filled in to match the size of your system memory (RAM).\n\nMust be greater than 1, contain only whole numbers, and end with either M or G."
|
||||
_swapsize="\nEnter the size of the swapfile in megabytes (M) or gigabytes (G).\n\ne.g. 100M will create a 100 megabyte swapfile, while 10G will create a 10 gigabyte swapfile.\n\nFor ease of use and as an example it is filled in to match the size of your system memory (RAM).\n\nMust be greater than 1, contain only whole numbers, and end with either M or G."
|
||||
_expart="\nYou can now choose any additional partitions you want mounted, you'll be asked for a mountpoint after.\n\nSelect 'done' to finish the mounting step and begin unpacking the base system in the background."
|
||||
_exmnt="\nWhere do you want the partition mounted?\n\nEnsure the name begins with a slash (/).\nExamples include: /usr, /home, /var, etc."
|
||||
_bginstall="\nThe background install will now start, select which base install method to use\n\nPacstrap - guarantees the latest packages and avoids issues but is slower and network dependant\nCopy ISO - is faster and not network dependant but can result in installation issues\n"
|
||||
_user="\nEnter a name and password for the new user account.\n\nThe name must not use capital letters, contain any periods (.), end with a hyphen (-), or include any colons (:)\n\nNOTE: Use [Up], [Down], or [Tab] to switch between fields, and [Enter] to accept."
|
||||
_hostname="\nEnter a hostname for the new system.\n\nA hostname is used to identify systems on the network.\n\nIt's restricted to alphanumeric characters (a-z, A-Z, 0-9).\nIt can contain hyphens (-) BUT NOT at the beginning or end."
|
||||
_locale="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\neg. en_US is: English United States\n en_GB is: English Great Britain"
|
||||
_locale="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\ne.g. en_US is: English United States\n en_GB is: English Great Britain"
|
||||
_timez="\nSelect your timezone country or continent from the list below"
|
||||
_timesubz="\nSelect your time zone city.\n\nTIP: Pressing a letter key repeatedly navigates between entries beginning with that letter."
|
||||
_sessions="\nUse [Space] to toggle available sessions, use [Enter] to accept the selection and continue.\n\nA basic package set will be installed for compatibility and functionality."
|
||||
@ -338,7 +338,7 @@ _lvmdel="Delete an Existing Volume Group"
|
||||
_lvmdelall="Delete ALL Volume Group(s) and Volume(s)"
|
||||
_lvmvgname="\nEnter a name for the volume group (VG) being created from the partition(s) selected."
|
||||
_lvmlvname="\nEnter a name for the logical volume (LV) being created.\n\nThis is similar to setting a label for a partition."
|
||||
_lvmlvsize="\nEnter what size you want the logical volume (LV) to be in megabytes (M) or gigabytes (G).\n\neg. 100M will create a 100 megabyte volume, 10G will create a 10 gigabyte volume."
|
||||
_lvmlvsize="\nEnter what size you want the logical volume (LV) to be in megabytes (M) or gigabytes (G).\n\ne.g. 100M will create a 100 megabyte volume, 10G will create a 10 gigabyte volume."
|
||||
_lvmdelask="\nConfirm deletion of volume group(s) and logical volume(s).\n\nDeleting a volume group, will delete all logical volumes within it.\n"
|
||||
|
||||
# Errors
|
||||
@ -350,7 +350,7 @@ _lvmerr="\nThere are no viable partitions available to use for LVM, a minimum of
|
||||
_lvmerrvgname="\nInvalid name entered.\n\nThe volume group name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
||||
_btrfserrname="\nInvalid name entered.\n\nThe subvolume name may be alpha-numeric, but may not contain spaces, start with a '/', or already be in use.\n"
|
||||
_lvmerlvname="\nInvalid name entered.\n\nThe logical volume (LV) name may be alpha-numeric, but may not contain spaces or be preceded with a '/'\n"
|
||||
_lvmerrlvsize="\nInvalid value Entered.\n\nMust be a numeric value with 'M' (megabytes) or 'G' (gigabytes) at the end.\n\neg. 400M, 10G, 250G, etc...\n\nThe value may also not be equal to or greater than the remaining size of the volume group.\n"
|
||||
_lvmerrlvsize="\nInvalid value Entered.\n\nMust be a numeric value with 'M' (megabytes) or 'G' (gigabytes) at the end.\n\ne.g. 400M, 10G, 250G, etc...\n\nThe value may also not be equal to or greater than the remaining size of the volume group.\n"
|
||||
|
||||
# }
|
||||
|
||||
@ -2473,14 +2473,14 @@ btrfs_subvols()
|
||||
local mntp="${MNT}$2"
|
||||
local mvol=''
|
||||
|
||||
btrfs_name "\nEnter a name for the initial subvolume on $part." || return 1
|
||||
btrfs_name "\nEnter a name for the initial subvolume on $part e.g. 'subvol_root'." || return 1
|
||||
mvol="$SUBVOL"
|
||||
[[ $mntp == "$MNT" ]] && BTRFS_MNT="rootflags=subvol=$mvol"
|
||||
btrfs subvolume create "$mntp/$mvol" > /dev/null 2> "$ERR"
|
||||
errshow 0 "btrfs subvolume create $mntp/$mvol" || return 1
|
||||
|
||||
umount_dir "$mntp" || return 1
|
||||
select_mntopts 'btrfs' && [[ $MNT_OPTS ]] && MNT_OPTS+=','
|
||||
select_mntopts "$part" 'btrfs' && [[ $MNT_OPTS ]] && MNT_OPTS+=','
|
||||
mount -o ${MNT_OPTS}subvol="$mvol" "$part" "$mntp" 2> "$ERR"
|
||||
errshow 0 "mount -o ${MNT_OPTS}subvol=$mvol $part $mntp" || return 1
|
||||
|
||||
|
Reference in New Issue
Block a user