Blame SOURCES/cobbler-koan-rhpl.patch

1330ca
--- ./koan/app.py	2010-10-18 15:40:34.000000000 +0200
1330ca
+++ ./koan/app.py	2011-01-07 11:47:23.173337611 +0100
1330ca
@@ -382,10 +382,6 @@ class Koan:
1330ca
         Determine the name of the cobbler system record that
1330ca
         matches this MAC address. 
1330ca
         """
1330ca
-        try:
1330ca
-            import rhpl
1330ca
-        except:
1330ca
-            raise CX("the rhpl module is required to autodetect a system.  Your OS does not have this, please manually specify --profile or --system")
1330ca
         systems = self.get_data("systems")
1330ca
         my_netinfo = utils.get_network_info()
1330ca
         my_interfaces = my_netinfo.keys()
1330ca
--- ./koan/utils.py	2010-10-18 15:40:34.000000000 +0200
1330ca
+++ ./koan/utils.py	2011-01-07 11:47:23.173337611 +0100
1330ca
@@ -383,22 +383,26 @@ def uniqify(lst, purge=None):
1330ca
 
1330ca
 def get_network_info():
1330ca
    try:
1330ca
-      import rhpl.ethtool 
1330ca
+      import ethtool
1330ca
    except:
1330ca
-      raise InfoException("the rhpl module is required to use this feature (is your OS>=EL3?)")
1330ca
+      try:
1330ca
+         import rhpl.ethtool
1330ca
+         ethtool = rhpl.ethtool
1330ca
+      except:
1330ca
+           raise InfoException("the rhpl or ethtool module is required to use this feature (is your OS>=EL3?)")
1330ca
 
1330ca
    interfaces = {}
1330ca
    # get names
1330ca
-   inames  = rhpl.ethtool.get_devices() 
1330ca
+   inames  = ethtool.get_devices()
1330ca
 
1330ca
    for iname in inames:
1330ca
-      mac = rhpl.ethtool.get_hwaddr(iname)
1330ca
+      mac = ethtool.get_hwaddr(iname)
1330ca
 
1330ca
       if mac == "00:00:00:00:00:00":
1330ca
          mac = "?"
1330ca
 
1330ca
       try:
1330ca
-         ip  = rhpl.ethtool.get_ipaddr(iname)
1330ca
+         ip  = ethtool.get_ipaddr(iname)
1330ca
          if ip == "127.0.0.1":
1330ca
             ip = "?"
1330ca
       except:
1330ca
@@ -408,7 +412,7 @@ def get_network_info():
1330ca
       module = ""
1330ca
 
1330ca
       try:
1330ca
-         nm  = rhpl.ethtool.get_netmask(iname)
1330ca
+         nm  = ethtool.get_netmask(iname)
1330ca
       except:
1330ca
          nm  = "?"
1330ca