summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2009-05-08 11:35:01 -0400
committerMichael DeHaan <mdehaan@redhat.com>2009-05-08 11:35:43 -0400
commit709d26c40e9000e40a09e0f20a51d0811ee6d0fe (patch)
tree59850a85f42296dfc9ced047cf56d60844676f7a
parent64fd31bfdbf81abf4855aafeef231347137e2f1c (diff)
downloadcobbler-709d26c40e9000e40a09e0f20a51d0811ee6d0fe.tar.gz
cobbler-709d26c40e9000e40a09e0f20a51d0811ee6d0fe.tar.xz
cobbler-709d26c40e9000e40a09e0f20a51d0811ee6d0fe.zip
For ISC, don't append the interface name if it's eth0. Fix template indentation.
-rw-r--r--cobbler/modules/manage_isc.py5
-rw-r--r--templates/dhcp.template8
2 files changed, 8 insertions, 5 deletions
diff --git a/cobbler/modules/manage_isc.py b/cobbler/modules/manage_isc.py
index d5c659e0..6369b961 100644
--- a/cobbler/modules/manage_isc.py
+++ b/cobbler/modules/manage_isc.py
@@ -216,7 +216,10 @@ class IscManager:
# the label the entry after the hostname if possible
if host is not None and host != "":
- interface["name"] = "%s_%s"%(host,name)
+ if name != "eth0":
+ interface["name"] = "%s_%s" % (host,name)
+ else:
+ interface["name"] = "%s" % (host)
else:
interface["name"] = "generic%d" % counter
diff --git a/templates/dhcp.template b/templates/dhcp.template
index 46171fee..66476ad3 100644
--- a/templates/dhcp.template
+++ b/templates/dhcp.template
@@ -42,16 +42,16 @@ group {
host $iface.name {
hardware ethernet $mac;
#if $iface.ip_address:
- fixed-address $iface.ip_address;
+ fixed-address $iface.ip_address;
#end if
#if $iface.hostname:
- option host-name "$iface.hostname";
+ option host-name "$iface.hostname";
#end if
#if $iface.subnet:
- option subnet-mask $iface.subnet;
+ option subnet-mask $iface.subnet;
#end if
#if $iface.gateway:
- option routers $iface.gateway;
+ option routers $iface.gateway;
#end if
filename "$iface.filename";
## Cobbler defaults to $next_server, but some users