diff options
author | narindergupta <narinder.gupta@canonical.com> | 2017-04-28 11:29:24 +0200 |
---|---|---|
committer | narindergupta <narinder.gupta@canonical.com> | 2017-04-28 11:30:02 +0200 |
commit | bdd8b40ac6b40cb126b4b13f1ae74f7dfeffcd68 (patch) | |
tree | f54ee4221543275dfae4db1d2952cdf837d147b3 /ci | |
parent | 3b01c25368e43aac8fd424585a51ffd65d539812 (diff) |
modified to correct the error ID failed in case of error.
Change-Id: I669aeccd0ceef758fa9eee87d46426bd6a78230b
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/03-maasdeploy.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh index 505e167f..85239506 100755 --- a/ci/03-maasdeploy.sh +++ b/ci/03-maasdeploy.sh @@ -654,8 +654,10 @@ if [ -e ./labconfig.json ]; then IF_MACLOWER=$( cat labconfig.json | jq ".lab.racks[0].nodes[$NODE_ID].nics[] | select(.ifname==\"$IF_NEWNAME\")".mac[0]) IF_MAC=(${IF_MACLOWER,,}) IF_ID=$( maas ubuntu interfaces read $NODE_SYS_ID | jq ".[] | select(.mac_address==$IF_MAC)".id) - maas $PROFILE interface update $NODE_SYS_ID $IF_ID name=$IF_NEWNAME - IF_NAME=$IF_NEWNAME + if ([ $IF_ID ] && [ "$IF_ID" != "null" ]); then + maas $PROFILE interface update $NODE_SYS_ID $IF_ID name=$IF_NEWNAME + IF_NAME=$IF_NEWNAME + fi fi # In case of a VLAN interface |