Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: host/image_to_live.sh

Issue 6873013: Add an option to specify an alternative NIC for image_to_live.sh (Closed) Base URL: http://git.chromium.org/git/dev-util.git@master
Patch Set: . Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: host/image_to_live.sh
diff --git a/host/image_to_live.sh b/host/image_to_live.sh
index 9d0aa69290233a3cab08414cf2e8fbeabdcf46c4..aeeb4866ad8bd47ae69c647655920e5a049971d3 100755
--- a/host/image_to_live.sh
+++ b/host/image_to_live.sh
@@ -19,6 +19,9 @@ DEFINE_boolean ignore_hostname ${FLAGS_TRUE} \
"Ignore existing AU hostname on running instance use this hostname."
DEFINE_boolean ignore_version ${FLAGS_TRUE} \
"Ignore existing version on running instance and always update."
+DEFINE_string netdev "eth0" \
+ "The network device to use for figuring out hostname. \
+ This is useful on hosts with multiple NICs."
DEFINE_string server_log "dev_server.log" \
"Path to log for the devserver."
DEFINE_boolean update "${FLAGS_TRUE}" \
@@ -92,7 +95,7 @@ function get_hostname {
# Dedicated usb NIC? Perhaps this detection should be done in the target,
# which will get the return address in one way or another. Or maybe we should
# just open a ssh tunnel and use localhost.
- hostname=$(/sbin/ifconfig eth0 |
+ hostname=$(/sbin/ifconfig ${FLAGS_netdev} |
grep 'inet addr' |
cut -f2 -d':' |
cut -f1 -d' ')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698