From 7382df8fa1fbc922827981a4cfd03c03b7888fb3 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Sat, 6 Mar 2021 19:18:23 +0000 Subject: [PATCH] Fix BOOTDISK expected logic --- Dockerfile | 11 +++++------ Dockerfile.auto | 5 +++-- Dockerfile.naked | 9 +++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 099fa61..f5cba65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -247,7 +247,7 @@ USER arch ENV USER arch -ENV BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 +ENV BOOTDISK ENV DISPLAY=:0.0 @@ -258,8 +258,6 @@ ENV IMAGE_PATH=/home/arch/OSX-KVM/mac_hdd_ng.img # ENV NETWORKING=e1000-82545em ENV NETWORKING=vmxnet3 -ENV NOPICKER=false - # Boolean for generating a bootdisk with new random serials. ENV GENERATE_UNIQUE=false @@ -300,8 +298,9 @@ VOLUME ["/tmp/.X11-unix"] CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \ ; [[ "${NOPICKER}" == true ]] && { \ sed -i '/^.*InstallMedia.*/d' Launch.sh \ - && export BOOTDISK="${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ + && export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ ; } \ + || export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \ ./Docker-OSX/custom/generate-unique-machine-values.sh \ --master-plist-url="${MASTER_PLIST_URL}" \ @@ -310,7 +309,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS --bootdisks \ --width "${WIDTH:-1920}" \ --height "${HEIGHT:-1080}" \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ + --output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ --output-env "${ENV:=/env}" \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ @@ -324,7 +323,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS --mac-address "${MAC_ADDRESS}" \ --width "${WIDTH:-1920}" \ --height "${HEIGHT:-1080}" \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ + --output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; } \ ; ./enable-ssh.sh && envsubst < ./Launch.sh | bash diff --git a/Dockerfile.auto b/Dockerfile.auto index 90bb432..3ea721d 100644 --- a/Dockerfile.auto +++ b/Dockerfile.auto @@ -129,7 +129,7 @@ RUN if [[ "${COMPLETE}" ]]; then \ && wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \ ; fi -ENV BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 +ENV BOOTDISK ENV DISPLAY=:99 @@ -151,8 +151,9 @@ CMD echo "${BOILERPLATE}" \ ; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \ ; [[ "${NOPICKER}" == true ]] && { \ sed -i '/^.*InstallMedia.*/d' Launch.sh \ - && export BOOTDISK="${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ + && export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ ; } \ + || export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \ ./Docker-OSX/custom/generate-unique-machine-values.sh \ --master-plist-url="${MASTER_PLIST_URL}" \ diff --git a/Dockerfile.naked b/Dockerfile.naked index f002781..f0d0075 100644 --- a/Dockerfile.naked +++ b/Dockerfile.naked @@ -102,7 +102,7 @@ RUN mkdir -p ~/.ssh \ && tee -a ~/.ssh/config <<< ' StrictHostKeyChecking no' \ && tee -a ~/.ssh/config <<< ' UserKnownHostsFile=/dev/null' -ENV BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 +ENV BOOTDISK ENV DISPLAY=:99 @@ -121,8 +121,9 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS ; } \ ; [[ "${NOPICKER}" == true ]] && { \ sed -i '/^.*InstallMedia.*/d' Launch.sh \ - && export BOOTDISK="${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ + && export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2}" \ ; } \ + || export BOOTDISK="${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \ ./Docker-OSX/custom/generate-unique-machine-values.sh \ --master-plist-url="${MASTER_PLIST_URL}" \ @@ -131,7 +132,7 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS --bootdisks \ --width "${WIDTH:-1920}" \ --height "${HEIGHT:-1080}" \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ + --output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ --output-env "${ENV:=/env}" \ ; } \ ; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ @@ -145,6 +146,6 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS --mac-address "${MAC_ADDRESS}" \ --width "${WIDTH:-1920}" \ --height "${HEIGHT:-1080}" \ - --output-bootdisk "${BOOTDISK:-/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ + --output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}" \ ; } \ ; ./enable-ssh.sh && envsubst < ./Launch.sh | bash