From b5bf2baa9b1c10265cb7665127d0f9b1bb3d4c65 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 7 Mar 2007 18:47:40 -0700 Subject: [PATCH] iputil: use explicit /sbin/ifconfig, to avoid depending upon PATH --- src/allmydata/util/iputil.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/allmydata/util/iputil.py b/src/allmydata/util/iputil.py index 2e31ad53..f849b000 100644 --- a/src/allmydata/util/iputil.py +++ b/src/allmydata/util/iputil.py @@ -17,8 +17,8 @@ def get_local_addresses(): # this. For right now, I'm running ifconfig and grepping for the 'inet ' # lines. - cmd = "ifconfig" - p = os.popen("ifconfig") + cmd = "/sbin/ifconfig" + p = os.popen(cmd) addresses = [] for line in p.readlines(): # linux shows: " inet addr:1.2.3.4 Bcast:1.2.3.255..." @@ -37,8 +37,8 @@ def get_local_addresses_async(): # lines. # I'd love to do this synchronously. - cmd = "ifconfig" - d = getProcessOutput("ifconfig") + cmd = "/sbin/ifconfig" + d = getProcessOutput(cmd) def _parse(output): addresses = [] for line in StringIO(output).readlines(): -- 2.45.2