Michael DeHaan wrote:
I've applied this with a slight change -- namely that it will not do IP
detection if it clears MAC detection, if both are in cobbler we do not
want it to fail, but instead match on first available.

There's a small bug in your cobbler/services.py, which prevents MAC-based findks from working. Attached is a patch to fix this.


Carsten

--- cobbler/cobbler/services.py 2008-07-22 09:49:30.000000000 +0200
+++ services.py 2008-07-22 10:00:44.000000000 +0200
@@ -102,7 +102,7 @@
             # FIXME: will not key off other NICs, problem?
             mac = macinput.split()[1].strip()
         else:
-            macinput = "None"
+            mac = "None"
 
         ip = rest["REMOTE_ADDR"]
 
@@ -110,7 +110,7 @@
 
         for x in systems:
             for y in x["interfaces"]:
-                if x["interfaces"][y]["mac_address"].lower() == 
macinput.lower():
+                if x["interfaces"][y]["mac_address"].lower() == mac.lower():
                     candidates.append(x)
 
         if len(candidates) == 0:
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to