Merge branch 'cosmetic_improvements'
This commit is contained in:
commit
0ab301817f
@ -25,7 +25,7 @@ v_bpool_create_options= # array; see defaults below for format
|
||||
v_root_password= # Debian-only
|
||||
v_rpool_name=
|
||||
v_rpool_create_options= # array; see defaults below for format
|
||||
v_pools_raid_type=
|
||||
v_pools_raid_type=()
|
||||
declare -a v_selected_disks # (/dev/by-id/disk_id, ...)
|
||||
v_swap_size= # integer
|
||||
v_free_tail_space= # integer
|
||||
@ -504,8 +504,10 @@ Devices with mounted partitions, cdroms, and removable devices are not displayed
|
||||
function select_pools_raid_type {
|
||||
print_step_info_header
|
||||
|
||||
local raw_pools_raid_type=
|
||||
|
||||
if [[ -v ZFS_POOLS_RAID_TYPE ]]; then
|
||||
v_pools_raid_type=$ZFS_POOLS_RAID_TYPE
|
||||
raw_pools_raid_type=$ZFS_POOLS_RAID_TYPE
|
||||
elif [[ ${#v_selected_disks[@]} -ge 2 ]]; then
|
||||
# Entries preparation.
|
||||
|
||||
@ -536,7 +538,11 @@ function select_pools_raid_type {
|
||||
fi
|
||||
|
||||
local dialog_message="Select the pools RAID type."
|
||||
v_pools_raid_type=$(whiptail --radiolist "$dialog_message" 30 100 $((${#menu_entries_option[@]} / 3)) "${menu_entries_option[@]}" 3>&1 1>&2 2>&3)
|
||||
raw_pools_raid_type=$(whiptail --radiolist "$dialog_message" 30 100 $((${#menu_entries_option[@]} / 3)) "${menu_entries_option[@]}" 3>&1 1>&2 2>&3)
|
||||
fi
|
||||
|
||||
if [[ -n $raw_pools_raid_type ]]; then
|
||||
v_pools_raid_type=("$raw_pools_raid_type")
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1041,20 +1047,18 @@ function create_pools {
|
||||
#
|
||||
# Stdin is ignored if the encryption is not set (and set via prompt).
|
||||
#
|
||||
# shellcheck disable=SC2086 # TODO: convert v_pools_raid_type to array, and quote
|
||||
zpool create \
|
||||
"${encryption_options[@]}" \
|
||||
"${v_rpool_create_options[@]}" \
|
||||
-O mountpoint=/ -R "$c_zfs_mount_dir" -f \
|
||||
"$v_rpool_name" $v_pools_raid_type "${rpool_disks_partitions[@]}" \
|
||||
"$v_rpool_name" "${v_pools_raid_type[@]}" "${rpool_disks_partitions[@]}" \
|
||||
< "$c_passphrase_named_pipe"
|
||||
|
||||
# shellcheck disable=SC2086 # TODO: See above
|
||||
zpool create \
|
||||
-o cachefile=/etc/zfs/zpool.cache \
|
||||
"${v_bpool_create_options[@]}" \
|
||||
-O mountpoint=/boot -R "$c_zfs_mount_dir" -f \
|
||||
"$c_bpool_name" $v_pools_raid_type "${bpool_disks_partitions[@]}"
|
||||
"$c_bpool_name" "${v_pools_raid_type[@]}" "${bpool_disks_partitions[@]}"
|
||||
}
|
||||
|
||||
function create_swap_volume {
|
||||
@ -1244,9 +1248,9 @@ function configure_and_update_grub {
|
||||
#
|
||||
chroot_execute "perl -i -pe 's/(GRUB_TIMEOUT_STYLE=hidden)/#\$1/' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/^(GRUB_HIDDEN_.*)/#\$1/' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/(GRUB_TIMEOUT=)0/\${1}5/' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/(GRUB_CMDLINE_LINUX_DEFAULT=.*)quiet/\$1/' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/(GRUB_CMDLINE_LINUX_DEFAULT=.*)splash/\$1/' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/GRUB_TIMEOUT=\K0/5/' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/GRUB_CMDLINE_LINUX_DEFAULT=.*\Kquiet//' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/GRUB_CMDLINE_LINUX_DEFAULT=.*\Ksplash//' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/#(GRUB_TERMINAL=console)/\$1/' /etc/default/grub"
|
||||
chroot_execute 'echo "GRUB_RECORDFAIL_TIMEOUT=5" >> /etc/default/grub'
|
||||
|
||||
@ -1262,7 +1266,7 @@ function configure_and_update_grub_Debian {
|
||||
|
||||
chroot_execute "perl -i -pe 's/GRUB_CMDLINE_LINUX_DEFAULT=\"\K/init_on_alloc=0 /' /etc/default/grub"
|
||||
|
||||
chroot_execute "perl -i -pe 's/(GRUB_CMDLINE_LINUX_DEFAULT=.*)quiet/\$1/' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/GRUB_CMDLINE_LINUX_DEFAULT=.*\Kquiet//' /etc/default/grub"
|
||||
chroot_execute "perl -i -pe 's/#(GRUB_TERMINAL=console)/\$1/' /etc/default/grub"
|
||||
|
||||
chroot_execute "update-grub"
|
||||
|
Loading…
Reference in New Issue
Block a user