[SCM] Debian Live initramfs hook branch, master, updated. 1.157.2-1-8-g65054c0

Daniel Baumann daniel at debian.org
Mon May 25 09:40:42 UTC 2009


The following commit has been merged in the master branch:
commit 65054c0378c3f0ed105203a8572059d555e1b61c
Author: Steven Shiau <steven at nchc.org.tw>
Date:   Mon May 25 11:32:12 2009 +0200

    Making fetch to work with file on sub dir on tftp server.
    
    This patch allows live-initramfs to fetch file from sub
    dir on tftp server. The original one from live-initramfs 1.157.2 only
    works for the file existing on the root of tftp server, e.g.
    fetch=tftp://192.168.101.254/filesystem.squashfs
    
    It allows the PXE client to get the file either on the root, or on
    the sub dir, e.g. fetch=tftp://192.168.101.254/live/filesystem.squashfs
    is working now.

diff --git a/scripts/live b/scripts/live
index 4a793ad..683afa2 100755
--- a/scripts/live
+++ b/scripts/live
@@ -773,9 +773,11 @@ do_httpmount ()
 					then
 						case "$url" in
 							tftp*)
-								ip="$(dirname $url | sed -e 's|tftp://||g')"
-								log_begin_msg "Trying tftp -g -b 10240 -r $(basename ${url})  -l ${dest}/$(basename ${url}) $ip"
-								tftp -g -b 10240 -r $(basename ${url})  -l ${dest}/$(basename ${url}) $ip
+								ip="$(dirname $url | sed -e 's|tftp://||g' -e 's|/.*$||g')"
+								rfile="$(echo $url | sed -e "s|tftp://$ip||g")"
+								lfile="$(basename $url)"
+								log_begin_msg "Trying tftp -g -b 10240 -r $rfile -l ${dest}/$lfile $ip"
+								tftp -g -b 10240 -r $rfile -l ${dest}/$lfile $ip
 							;;
 
 							*)

-- 
Debian Live initramfs hook



More information about the debian-live-changes mailing list