client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 83cece4aafcd01804d31b399f0e476deab1787b7
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Dec 12 18:19:14 2012 +0100
properly specify device for 'ip route' command
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index 2f3e053..9a2d606 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -81,8 +81,8 @@ def find_name_servers():
ret.append(s)
return ret
-def find_gateway():
- response = execute("ip -f inet route list dev %s|awk '/^default/ {print
$3}'")
+def find_gateway(device):
+ response = execute("ip -f inet route list dev %s|awk '/^default/ {print
$3}'" % device)
if response:
return response[0]
else:
@@ -103,7 +103,7 @@ def getSystemId():
def update_static_device_records(kickstart_host, static_device):
client = xmlrpclib.Server("https://" + kickstart_host +
"/rpc/api")
- data = {"gateway" : find_gateway(),\
+ data = {"gateway" : find_gateway(static_device),\
"nameservers": find_name_servers(),\
"hostname" : find_host_name(),\
"device" : static_device,\
Show replies by date