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

Issue 6538067: scripts: use /sbin/ifconfig where appropriate (Closed)

Created:
9 years, 10 months ago by zbehan
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

scripts: use /sbin/ifconfig where appropriate BUG=n0ne TEST=cros_au_test_harness Change-Id: Ic26cc191fdb995b091d910f1c8a46e37085fea72 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=18d5703

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M image_to_live.sh View 1 chunk +1 line, -1 line 0 comments Download
M lib/cros_build_lib.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
zbehan
9 years, 10 months ago (2011-02-18 23:29:28 UTC) #1
Mandeep Singh Baines
9 years, 10 months ago (2011-02-18 23:36:59 UTC) #2
LGTM. Thanks!

zbehan@chromium.org (zbehan@chromium.org) wrote:
> Reviewers: sosa, Mandeep Singh Baines,
> 
> Description:
> scripts: use /sbin/ifconfig where appropriate
> 
> BUG=n0ne
> TEST=cros_au_test_harness
> 
> Change-Id: Ic26cc191fdb995b091d910f1c8a46e37085fea72
> 
> Please review this at http://codereview.chromium.org/6538067/
> 
> SVN Base: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
> 
> Affected files:
>   M image_to_live.sh
>   M lib/cros_build_lib.py
> 
> 
> Index: image_to_live.sh
> diff --git a/image_to_live.sh b/image_to_live.sh
> index
84072398b17ef901a774cedf4a0f95ac41d55ab5..c2aafc3c639ffa2c3b5126efe24ef62139bd3753
> 100755
> --- a/image_to_live.sh
> +++ b/image_to_live.sh
> @@ -107,7 +107,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=$(sudo ifconfig eth0 |
> +  hostname=$(/sbin/ifconfig eth0 |
>        grep 'inet addr' |
>        cut -f2 -d':' |
>        cut -f1 -d' ')
> Index: lib/cros_build_lib.py
> diff --git a/lib/cros_build_lib.py b/lib/cros_build_lib.py
> index
138bfa7db396112c56b4f1a8ad4980e459493bdb..d7da384e09b48f605246b027fa6eaa4767dbdbd0
> 100644
> --- a/lib/cros_build_lib.py
> +++ b/lib/cros_build_lib.py
> @@ -256,7 +256,7 @@ def GetIPAddress(device='eth0'):
>    this method gives you a generic way to get the address so you are
> reachable
>    either via a VM or remote machine on the same network.
>    """
> -  ifconfig_output = RunCommand(['sudo', 'ifconfig', device],
> +  ifconfig_output = RunCommand(['/sbin/ifconfig', device],
>                                 redirect_stdout=True, print_cmd=False)
>    match = re.search('.*inet addr:(\d+\.\d+\.\d+\.\d+).*', ifconfig_output)
>    if match:
> 
> 

Powered by Google App Engine
This is Rietveld 408576698