From 4ec4294d0d18e4300aa83c9479b0e718c4c5ecae Mon Sep 17 00:00:00 2001 From: Russell Stuart Date: Sat, 26 Dec 2015 10:01:45 +0100 Subject: [PATCH] default the host in fetch urls to be ROOTSERVER if it is blank Reason: this would mean I don't have to customise live.cfg for each server I deploy it on (because the tftp server also serves the root image). So: append fetch=tftp:///path/file.ext doesn't work now, but after the patch this would be assumed since the host is blank: append fetch=tftp://${ROOTSERVER}/path/file.ext Closes: #800498 --- components/9990-mount-http.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/9990-mount-http.sh b/components/9990-mount-http.sh index d0f4900..2e68fe6 100755 --- a/components/9990-mount-http.sh +++ b/components/9990-mount-http.sh @@ -25,6 +25,9 @@ do_httpmount () mount -t ramfs ram "${mountpoint}" mkdir -p "${dest}" fi + case "${url}" in + *:///*) url="${url%%:///*}://${ROOTSERVER}/${url##*:///}" ;; + esac if [ "${webfile}" = "FETCH" ] then case "$url" in -- 2.1.4