diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-08-01 14:28:59 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-08-01 14:29:13 +0200 |
commit | 2fb9fe00ac621038158b537c5abd312dff9ee2cb (patch) | |
tree | ef67b28ad67bf453c9e1c51bee310baddce1557c /scripts/install | |
parent | 771e535725cee0c01a80a71717afce85d7efcc70 (diff) | |
download | vyatta-cfg-system-2fb9fe00ac621038158b537c5abd312dff9ee2cb.tar.gz vyatta-cfg-system-2fb9fe00ac621038158b537c5abd312dff9ee2cb.zip |
install-image: T2690: add VRF support when installing new images
Diffstat (limited to 'scripts/install')
-rwxr-xr-x | scripts/install/install-image | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/install/install-image b/scripts/install/install-image index b8dcb20d..5eea4d15 100755 --- a/scripts/install/install-image +++ b/scripts/install/install-image @@ -55,7 +55,7 @@ while [ $# -gt 0 ]; do ;; --vrf*|-v) if [[ "$1" != *=* ]]; then shift; fi # Value is next arg if no `=` - VRF="${1#*=}" + VRF="ip vrf exec ${1#*=}" ;; --username*) if [[ "$1" != *=* ]]; then shift; fi @@ -106,16 +106,16 @@ fetch_iso_by_url () echo "Trying to fetch ISO file from $NEW_ISO" if [ -n "$USERNAME" ]; then - auth="-u $USERNAME:$PASSWORD" + AUTH="-u $USERNAME:$PASSWORD" else - auth="" + AUTH="" fi # This is for statistics collection vyos_version=`cat /opt/vyatta/etc/version | awk '{print $2}'` filename="${TEMP_DIR}/${NEW_ISO##*/}" - curl -L -H "User-Agent: VyOS/$vyos_version" $auth -f -o $filename $NEW_ISO + $VRF curl -L -H "User-Agent: VyOS/$vyos_version" $AUTH -f -o $filename $NEW_ISO curlerror=$? if [ $curlerror -eq 51 ]; then host=${NEW_ISO##scp://} @@ -133,7 +133,7 @@ fetch_iso_by_url () if [[ "$response" == "yes" || "$response" == "y" ]]; then mkdir -p ~/.ssh/ echo $rsa_key >> ~/.ssh/known_hosts - curl $auth -f -o $filename $NEW_ISO + $VRF curl $AUTH -f -o $filename $NEW_ISO curlerror=$? fi fi @@ -150,7 +150,7 @@ fetch_iso_by_url () echo "ISO download succeeded." echo "Checking for digital signature file..." - curl -L -H "User-Agent: VyOS/$vyos_version" $auth -f -o ${filename}.asc ${NEW_ISO}.asc + $VRF curl -L -H "User-Agent: VyOS/$vyos_version" $AUTH -f -o ${filename}.asc ${NEW_ISO}.asc if [ $? -ne 0 ]; then echo "Unable to fetch digital signature file." echo -n "Do you want to continue without signature check? (yes/no) [yes] " |