diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-04-10 12:02:20 +1000 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2013-04-10 11:12:35 -0700 |
commit | e3ebf4d2ebe3464257655f059ea020565a536643 (patch) | |
tree | 2779c1f3a7b0d6862961f47ba8e56db62886521a /utils/pb-udhcpc | |
parent | 8c3d5ce5b02ffce64ae3a8ab3fef43be17f6974d (diff) | |
download | talos-petitboot-e3ebf4d2ebe3464257655f059ea020565a536643.tar.gz talos-petitboot-e3ebf4d2ebe3464257655f059ea020565a536643.zip |
pb-udhcpc: Fix generation of TFTP URLs
DHCP boot-file parameters may not contain a preceeding slash. In this
case, the current udhcp script will not form a correct URL.
This change adds the slash unconditionally; in the case that the
pathname already has a preceeding slash, the URL parser will handle this
correctly.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'utils/pb-udhcpc')
-rw-r--r-- | utils/pb-udhcpc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/pb-udhcpc b/utils/pb-udhcpc index 45c8019..91d40f6 100644 --- a/utils/pb-udhcpc +++ b/utils/pb-udhcpc @@ -15,7 +15,7 @@ pb_add () { [ ${k_server_ip} != ${rootpath} ] || k_server_ip=${serverid} - printf "add@/net/${interface}\0name=netboot\0image=tftp://${siaddr}${boot_file}\0args=root=/dev/nfs ip=any nfsroot=${k_server_ip}:${k_root_dir}\0" | pb-event + printf "add@/net/${interface}\0name=netboot\0image=tftp://${siaddr}/${boot_file}\0args=root=/dev/nfs ip=any nfsroot=${k_server_ip}:${k_root_dir}\0" | pb-event } pb_remove () { |