From: Russell Stuart Date: Sat, 26 Dec 2015 09:01:45 +0000 (+0100) Subject: default the host in fetch urls to be ROOTSERVER if it is blank X-Git-Tag: debian/1%20160511~8 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;ds=sidebyside;h=4ec4294d0d18e4300aa83c9479b0e718c4c5ecae;p=live-boot-grml.git 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 --- 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