From e63a0068220a7f0fe66dcb0e0778c332c9e33bd6 Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Mon, 18 Apr 2016 15:17:37 +0200 Subject: [PATCH] iup: TFTP: Support for specifying the port in the URL (defaults to 69) --- iup/files/sbin/iup | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/iup/files/sbin/iup b/iup/files/sbin/iup index a6c188f5d..57211f92d 100755 --- a/iup/files/sbin/iup +++ b/iup/files/sbin/iup @@ -126,9 +126,14 @@ handle_provisioning() { if [ ${url%%:*} == "tftp" ]; then tftpfile=${url#*\/\/} host=${tftpfile%%\/*} + port=${host#*:} + host=${host%%:*} + if [-z ${port} ]; then + port=69 + fi tftpfile=${tftpfile#*\/} - /usr/bin/tftp -l $IUPCONFFILES -r "$tftpfile" -g "$host" + /usr/bin/tftp -l $IUPCONFFILES -r "$tftpfile" -g "$host" "$port" else get_image "$url" "cat" > $IUPCONFFILES fi