]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/installer/downloadsource.sh
installer: Fix umounting destination
[ipfire-2.x.git] / src / installer / downloadsource.sh
index 4a48686ea9453560065f80bf3a5d945f37f3f525..c74f9e232d2e1dc1874152ca71508736bb903c3c 100644 (file)
@@ -31,6 +31,15 @@ fi
 OUTPUT="${1}"
 URL="${2}"
 
+# Mount a tmpfs which is big enough to hold the ISO image
+OUTPUT_DIR="${OUTPUT%/*}"
+
+mkdir -p "${OUTPUT_DIR}"
+if ! mount -t tmpfs none "${OUTPUT_DIR}" -o size=512M; then
+       echo "Could not mount tmpfs to ${OUTPUT_DIR}" >&2
+       exit 1
+fi
+
 echo "Downloading ${URL}..."
 if ! download -O "${OUTPUT}" "${URL}"; then
        echo "Download failed" >&2