Fix bug in select loop so multiple options do not appear on the same line.
This commit is contained in:
@@ -192,6 +192,7 @@ select_disk() {
|
|||||||
lsblk -dno NAME,SIZE,TYPE,MODEL | grep -E "^($(IFS='|'; echo "${disks[*]}")).*disk" || true
|
lsblk -dno NAME,SIZE,TYPE,MODEL | grep -E "^($(IFS='|'; echo "${disks[*]}")).*disk" || true
|
||||||
|
|
||||||
PS3="Enter disk number: "
|
PS3="Enter disk number: "
|
||||||
|
COLUMNS=1
|
||||||
select diskChoice in "${disks[@]}" "Cancel"; do
|
select diskChoice in "${disks[@]}" "Cancel"; do
|
||||||
if [[ "$diskChoice" == "Cancel" ]]; then
|
if [[ "$diskChoice" == "Cancel" ]]; then
|
||||||
log_info "Disk selection cancelled by user"
|
log_info "Disk selection cancelled by user"
|
||||||
@@ -268,6 +269,7 @@ select_install_target() {
|
|||||||
|
|
||||||
local manualOption="Use existing /mnt (already mounted root/home/boot)"
|
local manualOption="Use existing /mnt (already mounted root/home/boot)"
|
||||||
PS3="Enter target number: "
|
PS3="Enter target number: "
|
||||||
|
COLUMNS=1
|
||||||
select targetChoice in "${disks[@]}" "$manualOption" "Cancel"; do
|
select targetChoice in "${disks[@]}" "$manualOption" "Cancel"; do
|
||||||
if [[ "$targetChoice" == "Cancel" ]]; then
|
if [[ "$targetChoice" == "Cancel" ]]; then
|
||||||
log_info "Target selection cancelled by user"
|
log_info "Target selection cancelled by user"
|
||||||
@@ -326,6 +328,7 @@ select_partition_layout() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
PS3="Enter layout number: "
|
PS3="Enter layout number: "
|
||||||
|
COLUMNS=1
|
||||||
select layout in "${layouts[@]}"; do
|
select layout in "${layouts[@]}"; do
|
||||||
case "$layout" in
|
case "$layout" in
|
||||||
"Single partition"*)
|
"Single partition"*)
|
||||||
@@ -1088,6 +1091,7 @@ gather_system_info() {
|
|||||||
local desktops=("Console only (Fenrir screen reader)" "i3 (tiling window manager)" "MATE (traditional desktop)")
|
local desktops=("Console only (Fenrir screen reader)" "i3 (tiling window manager)" "MATE (traditional desktop)")
|
||||||
|
|
||||||
PS3="Enter desktop number: "
|
PS3="Enter desktop number: "
|
||||||
|
COLUMNS=1
|
||||||
select desktop in "${desktops[@]}"; do
|
select desktop in "${desktops[@]}"; do
|
||||||
case "$desktop" in
|
case "$desktop" in
|
||||||
"Console only"*)
|
"Console only"*)
|
||||||
@@ -1122,6 +1126,7 @@ gather_system_info() {
|
|||||||
else
|
else
|
||||||
echo "Select which user should automatically login to the graphical session:"
|
echo "Select which user should automatically login to the graphical session:"
|
||||||
PS3="Enter user number: "
|
PS3="Enter user number: "
|
||||||
|
COLUMNS=1
|
||||||
select selectedUser in "${userNames[@]}"; do
|
select selectedUser in "${userNames[@]}"; do
|
||||||
if [[ -n "$selectedUser" ]]; then
|
if [[ -n "$selectedUser" ]]; then
|
||||||
autoLoginUser="$selectedUser"
|
autoLoginUser="$selectedUser"
|
||||||
|
|||||||
Reference in New Issue
Block a user