diff --git a/Dockerfile b/Dockerfile index 2a9a274..d731838 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG VERSION_ARG="latest" FROM scratch AS build-amd64 -COPY --from=qemux/qemu:7.04 / / +COPY --from=qemux/qemu:7.05 / / ARG DEBCONF_NOWARNINGS="yes" ARG DEBIAN_FRONTEND="noninteractive" diff --git a/src/install.sh b/src/install.sh index 57e39f7..2281d9e 100644 --- a/src/install.sh +++ b/src/install.sh @@ -16,6 +16,7 @@ skipInstall() { if [ -f "$previous" ]; then previous=$(<"$previous") + previous="${previous//[![:print:]]/}" if [ -n "$previous" ]; then previous="$STORAGE/$previous" if [[ "${previous,,}" != "${iso,,}" ]]; then @@ -1014,19 +1015,27 @@ bootWindows() { if [ -f "$STORAGE/windows.args" ]; then ARGS=$(<"$STORAGE/windows.args") + ARGS="${ARGS//[![:print:]]/}" ARGUMENTS="$ARGS ${ARGUMENTS:-}" fi if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then - [ -z "${DISK_TYPE:-}" ] && DISK_TYPE=$(<"$STORAGE/windows.type") + if [ -z "${DISK_TYPE:-}" ]; then + DISK_TYPE=$(<"$STORAGE/windows.type") + DISK_TYPE="${DISK_TYPE//[![:print:]]/}" + fi fi if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then BOOT_MODE=$(<"$STORAGE/windows.mode") + BOOT_MODE="${BOOT_MODE//[![:print:]]/}" fi if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then - [[ "${PLATFORM,,}" == "x64" ]] && MACHINE=$(<"$STORAGE/windows.old") + if [[ "${PLATFORM,,}" == "x64" ]]; then + MACHINE=$(<"$STORAGE/windows.old") + MACHINE="${MACHINE//[![:print:]]/}" + fi fi return 0 diff --git a/src/mido.sh b/src/mido.sh index bbaa5c2..37e075b 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -93,6 +93,7 @@ download_windows() { # uuidgen: For MacOS (installed by default) and other systems (e.g. with no /proc) that don't have a kernel interface for generating random UUIDs session_id=$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random) + session_id="${session_id//[![:print:]]/}" # Get product edition ID for latest release of given Windows version # Product edition ID: This specifies both the Windows release (e.g. 22H2) and edition ("multi-edition" is default, either Home/Pro/Edu/etc., we select "Pro" in the answer files) in one number