Merge lp:~terceiro/lava-deployment-tool/fix-1056428 into lp:~linaro-validation/lava-deployment-tool/trunk
Proposed by
Antonio Terceiro
Status: | Merged |
---|---|
Merged at revision: | 209 |
Proposed branch: | lp:~terceiro/lava-deployment-tool/fix-1056428 |
Merge into: | lp:~linaro-validation/lava-deployment-tool/trunk |
Diff against target: |
36 lines (+11/-2) 1 file modified
lava-deployment-tool (+11/-2) |
To merge this branch: | bzr merge lp:~terceiro/lava-deployment-tool/fix-1056428 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Linaro Validation Team | Pending | ||
Review via email: mp+127030@code.launchpad.net |
Description of the change
To post a comment you must log in.
+ if [ -z "$LAVA_SERVER_IP" ]; then
+ # try the IP associated with the default gateway
+ LAVA_SERVER_IP=$(ip route | awk '{ if ($1 == "default") { print($3) } }')
+ fi
Doesn't this return the IP of the gateway? ie, my "ip route" returns:
default via 192.168.0.1 dev eth0 proto static
the idea is pretty good though. just print $5, which would give you "eth0". and then you can pull the ip address via ifconfig $iface