summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2020-11-24 12:16:16 +0100
committerMatthijs Kooijman <matthijs@stdin.nl>2020-11-24 12:24:14 +0100
commite772dfd6d2849892ec03f611f621336676cf8b2b (patch)
tree063af91a791e2f14aeabfc796d04ff5cbcc3ba12
parentc4b239caf51b39ff21b69de1a81f79732594a2a3 (diff)
downloadvyos-live-build-e772dfd6d2849892ec03f611f621336676cf8b2b.tar.gz
vyos-live-build-e772dfd6d2849892ec03f611f621336676cf8b2b.zip
binary_iso: Execute mkdir binary/.disk before writing to it
Before commit 9f3e5fe8d (Fix the way the .disk/mkisofs file is created) all these commands (`mkdir`, write to `binary/.disk/mkisofs` and `xorriso`) were in the same `binary.sh` script. Since that commit, the write was extracted, to prevent issues with quoting, but the related mkdir was left in `binary.sh`. This means that the write is now executed first, and the `mkdir` only afterwards, making the `mkdir` quite pointless. In practice, this did not break becaue binary_disk also does the same `mkdir` and runs before `binary_iso`, but if one runs commands manually and skips `binary_iso`, then this does break. Even though this is not really a supported usecase, just move the mkdir outside of `binary.sh`, so it runs *before* the write again as intended.
-rwxr-xr-xscripts/build/binary_iso2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso
index e5724c32c..bf6d9b29d 100755
--- a/scripts/build/binary_iso
+++ b/scripts/build/binary_iso
@@ -167,11 +167,11 @@ esac
cat > binary.sh << EOF
#!/bin/sh
-mkdir -p binary/.disk
xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary
EOF
# retain the xorriso command used to create the image in the image itself
+mkdir -p binary/.disk
cat <<-EOF >binary/.disk/mkisofs
xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary
EOF