Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions root/patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- casper 2020-04-08 21:24:58.000000000 +0000
+++ casper.new 2020-04-23 17:13:23.139096816 +0000
+++ casper.new 2025-03-04 16:22:09.000000000 +0000
@@ -46,7 +46,7 @@ parse_cmdline() {
STATICIP="frommedia"
fi
Expand Down Expand Up @@ -27,16 +27,18 @@
- umount $mountpoint
- fi
- fi
- fi
+ mkdir -p ${mountpoint}
+ mount -t tmpfs -o size=`/bin/curl -sI ${URL} | sed -ne '/Content-Length/{s/.*: //;p}'` tmpfs ${mountpoint}
+ mkdir -p ${mountpoint}/casper
+ if /bin/curl -L ${URL} -o ${mountpoint}/casper/root.squashfs; then rc=0; fi
+ if [ ! -z "$(/bin/curl -sI "${URL}".part2 | grep "200 OK\|302 Found" || :)" ]; then
+ if /bin/curl -L ${URL}.part2 -o ->> ${mountpoint}/casper/root.squashfs; then rc=0; fi
+ fi
+ if [ ! -z "$(/bin/curl -sI "${URL}".part3 | grep "200 OK\|302 Found" || :)" ]; then
+ if /bin/curl -L ${URL}.part3 -o ->> ${mountpoint}/casper/root.squashfs; then rc=0; fi
fi
-
+ for n in $(seq 2 10); do
+ if [ ! -z "$(/bin/curl -sI "${URL}.part${n}" | grep "200 OK\|302 Found" || :)" ]; then
+ if /bin/curl -L "${URL}.part${n}" -o ->> ${mountpoint}/casper/root.squashfs; then rc=0; fi
+ else
+ break
+ fi
+ done

return ${rc}
}