Fixed conditional confustion in config existence check in ./install

This commit is contained in:
oddlama 2021-05-31 17:17:40 +02:00
parent 68a128153c
commit a80b22f687
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
2 changed files with 10 additions and 6 deletions

View File

@ -109,10 +109,10 @@ if [[ -z "$ACTION" ]]; then
fi
fi
# Load config if we aren't just chrooting
if [[ -e "$CONFIG" ]]; then
# Load config if we aren't just chrooting
[[ "$ACTION" == "chroot" ]] \
|| die "Configuration file '$CONFIG' does not exist. To run the configurator, omit '-i' or "
continue
# shellcheck disable=SC1090
source "$CONFIG" || die "Could not source config"
@ -120,6 +120,8 @@ if [[ -e "$CONFIG" ]]; then
|| die "You have not properly read the config. Edit the config file and set I_HAVE_READ_AND_EDITED_THE_CONFIG_PROPERLY=true to continue."
preprocess_config
elif [[ "$ACTION" != "chroot" ]]; then
die "Configuration file '$CONFIG' does not exist. To run the configurator, omit '-i' flag or run ./configure"
fi
[[ $EUID == 0 ]] \

View File

@ -7,11 +7,13 @@ virt-install \
--memory=2048 \
--cdrom=/vm/images/archlinux-2021.05.01-x86_64.iso \
--disk path=/vm/disks/disk-vm-gentoo-zfs.disk,size=25 \
--graphics none \
--console pty,target.type=virtio \
--serial pty \
--extra-args 'console=ttyS0,115200n8 --- console=ttyS0,115200n8' \
--transient \
--boot uefi \
--os-variant=gentoo \
--noautoconsole
# --graphics none \
# --console pty,target.type=virtio \
# --serial pty \
# --extra-args 'console=ttyS0,115200n8 --- console=ttyS0,115200n8' \
# virsh