mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
iup: TFTP: Support for specifying the port in the URL (defaults to 69)
This commit is contained in:
parent
93cd4c477d
commit
e63a006822
1 changed files with 6 additions and 1 deletions
|
|
@ -126,9 +126,14 @@ handle_provisioning() {
|
||||||
if [ ${url%%:*} == "tftp" ]; then
|
if [ ${url%%:*} == "tftp" ]; then
|
||||||
tftpfile=${url#*\/\/}
|
tftpfile=${url#*\/\/}
|
||||||
host=${tftpfile%%\/*}
|
host=${tftpfile%%\/*}
|
||||||
|
port=${host#*:}
|
||||||
|
host=${host%%:*}
|
||||||
|
if [-z ${port} ]; then
|
||||||
|
port=69
|
||||||
|
fi
|
||||||
tftpfile=${tftpfile#*\/}
|
tftpfile=${tftpfile#*\/}
|
||||||
|
|
||||||
/usr/bin/tftp -l $IUPCONFFILES -r "$tftpfile" -g "$host"
|
/usr/bin/tftp -l $IUPCONFFILES -r "$tftpfile" -g "$host" "$port"
|
||||||
else
|
else
|
||||||
get_image "$url" "cat" > $IUPCONFFILES
|
get_image "$url" "cat" > $IUPCONFFILES
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue