fix: deploy-disk.sh --boot argument parsing + installer combo ids
The installer failed with:
deploy-disk.sh /dev/vda ... workstation --boot
error: --boot must be bios|efi (got --boot)
Two bugs:
1. deploy-disk.sh treated $4 as the bare boot value, but every caller
(installer, build-image.sh, install.sh) passes "--boot <val>", so $4
was the literal "--boot". It now parses "--boot <bios|efi>", accepts a
bare positional too, and falls back to the BOOT build variable. This
also fixes build-image.sh / install.sh, which had the same mismatch.
2. installer/arcline-installer built the boot ComboBox with append(id,text)
arguments swapped, so get_active_id() returned "UEFI (grub-efi-amd64)"
instead of "efi". Fixed the id/text order.
This commit is contained in:
@@ -25,7 +25,16 @@ source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
||||
DEV="${1:?usage: deploy-disk.sh <device> <rootfs> <edition> [--boot bios|efi]}"
|
||||
ROOTFS="${2:?usage: deploy-disk.sh <device> <rootfs> <edition> [--boot bios|efi]}"
|
||||
EDITION="${3:?usage: deploy-disk.sh <device> <rootfs> <edition> [--boot bios|efi]}"
|
||||
BOOT="${4:-$BOOT}" # default from the BOOT build variable (see versions.mk)
|
||||
shift 3
|
||||
|
||||
# Optional --boot <bios|efi> (a bare 4th positional is accepted too). Defaults
|
||||
# to the BOOT build variable (versions.mk / common.sh).
|
||||
BOOT="${BOOT:-bios}"
|
||||
if [[ $# -ge 2 && "$1" == "--boot" ]]; then
|
||||
BOOT="$2"
|
||||
elif [[ $# -ge 1 ]]; then
|
||||
BOOT="$1"
|
||||
fi
|
||||
|
||||
require_root "$0" "$@"
|
||||
validate_edition "$EDITION"
|
||||
|
||||
Reference in New Issue
Block a user