Merge pull request #169 from sickcodes/nopicker-bug

Fix BOOTDISK expected logic
This commit is contained in:
sickcodes 2021-03-06 19:39:10 +00:00 committed by GitHub
commit 7f2ef89ab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 12 deletions

View File

@ -247,7 +247,7 @@ USER arch
ENV USER arch ENV USER arch
ENV BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 ENV BOOTDISK=
ENV DISPLAY=:0.0 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=e1000-82545em
ENV NETWORKING=vmxnet3 ENV NETWORKING=vmxnet3
ENV NOPICKER=false
# Boolean for generating a bootdisk with new random serials. # Boolean for generating a bootdisk with new random serials.
ENV GENERATE_UNIQUE=false 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 \ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
; [[ "${NOPICKER}" == true ]] && { \ ; [[ "${NOPICKER}" == true ]] && { \
sed -i '/^.*InstallMedia.*/d' Launch.sh \ 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 ]] && { \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \
./Docker-OSX/custom/generate-unique-machine-values.sh \ ./Docker-OSX/custom/generate-unique-machine-values.sh \
--master-plist-url="${MASTER_PLIST_URL}" \ --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 \ --bootdisks \
--width "${WIDTH:-1920}" \ --width "${WIDTH:-1920}" \
--height "${HEIGHT:-1080}" \ --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}" \ --output-env "${ENV:=/env}" \
; } \ ; } \
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ ; [[ "${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}" \ --mac-address "${MAC_ADDRESS}" \
--width "${WIDTH:-1920}" \ --width "${WIDTH:-1920}" \
--height "${HEIGHT:-1080}" \ --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 ; ./enable-ssh.sh && envsubst < ./Launch.sh | bash

View File

@ -129,7 +129,7 @@ RUN if [[ "${COMPLETE}" ]]; then \
&& wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \ && wget ${WGET_OPTIONS} -O /home/arch/OSX-KVM/mac_hdd_ng.img "${IMAGE_URL}" \
; fi ; fi
ENV BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore-nopicker.qcow2 ENV BOOTDISK=
ENV DISPLAY=:99 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 \ ; sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDISK}" "${ENV}" 2>/dev/null || true \
; [[ "${NOPICKER}" == true ]] && { \ ; [[ "${NOPICKER}" == true ]] && { \
sed -i '/^.*InstallMedia.*/d' Launch.sh \ 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 ]] && { \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \
./Docker-OSX/custom/generate-unique-machine-values.sh \ ./Docker-OSX/custom/generate-unique-machine-values.sh \
--master-plist-url="${MASTER_PLIST_URL}" \ --master-plist-url="${MASTER_PLIST_URL}" \

View File

@ -102,7 +102,7 @@ RUN mkdir -p ~/.ssh \
&& tee -a ~/.ssh/config <<< ' StrictHostKeyChecking no' \ && tee -a ~/.ssh/config <<< ' StrictHostKeyChecking no' \
&& tee -a ~/.ssh/config <<< ' UserKnownHostsFile=/dev/null' && tee -a ~/.ssh/config <<< ' UserKnownHostsFile=/dev/null'
ENV BOOTDISK=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2 ENV BOOTDISK=
ENV DISPLAY=:99 ENV DISPLAY=:99
@ -121,8 +121,9 @@ CMD sudo chown -R $(id -u):$(id -g) /dev/kvm /dev/snd "${IMAGE_PATH}" "${BOOTDIS
; } \ ; } \
; [[ "${NOPICKER}" == true ]] && { \ ; [[ "${NOPICKER}" == true ]] && { \
sed -i '/^.*InstallMedia.*/d' Launch.sh \ 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 ]] && { \ ; [[ "${GENERATE_UNIQUE}" == true ]] && { \
./Docker-OSX/custom/generate-unique-machine-values.sh \ ./Docker-OSX/custom/generate-unique-machine-values.sh \
--master-plist-url="${MASTER_PLIST_URL}" \ --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 \ --bootdisks \
--width "${WIDTH:-1920}" \ --width "${WIDTH:-1920}" \
--height "${HEIGHT:-1080}" \ --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}" \ --output-env "${ENV:=/env}" \
; } \ ; } \
; [[ "${GENERATE_SPECIFIC}" == true ]] && { \ ; [[ "${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}" \ --mac-address "${MAC_ADDRESS}" \
--width "${WIDTH:-1920}" \ --width "${WIDTH:-1920}" \
--height "${HEIGHT:-1080}" \ --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 ; ./enable-ssh.sh && envsubst < ./Launch.sh | bash