Skip to content

Commit

Permalink
Making fetch to work with file on sub dir on tftp server.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stevenshiau authored and daniel-baumann committed May 25, 2009
1 parent 336b248 commit db1fd6b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/live
Expand Up @@ -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
;;

*)
Expand Down

0 comments on commit db1fd6b

Please sign in to comment.