fix: test for DISK_ID_EFI and DISK_ID_BIOS variable existence before expansion (fixes #15)

This commit is contained in:
oddlama 2021-10-27 13:07:55 +02:00
parent f9890ed1ec
commit 1a920427a6
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
1 changed files with 2 additions and 2 deletions

View File

@ -32,9 +32,9 @@ function check_config() {
[[ $HOSTNAME =~ $hostname_regex ]] \
|| die "'$HOSTNAME' is not a valid hostname"
[[ -n $DISK_ID_ROOT ]] \
[[ -v "DISK_ID_ROOT" && -n $DISK_ID_ROOT ]] \
|| die "You must assign DISK_ID_ROOT"
[[ -n $DISK_ID_EFI ]] || [[ -n $DISK_ID_BIOS ]] \
[[ -v "DISK_ID_EFI" && -n $DISK_ID_EFI ]] || [[ -v "DISK_ID_BIOS" && -n $DISK_ID_BIOS ]] \
|| die "You must assign DISK_ID_EFI or DISK_ID_BIOS"
[[ -v "DISK_ID_BIOS" ]] && [[ ! -v "DISK_ID_TO_UUID[$DISK_ID_BIOS]" ]] \