From 9b19692f95b4a853a8214774bfcc65ea0d7632ad Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 Oct 2007 12:25:22 +0000 Subject: [PATCH] Applied patch from ticket 187 git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7490 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_termDNS.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index 065a6e112..b92661132 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -214,7 +214,7 @@ class termDNS extends plugin $this->dialog = new dhcpHost($this->dhcpHostEntry,TRUE); } $this->dialog->cn = $this->cn; - $this->dialog->dhcpHWAddress = $this->macAddress; + $this->dialog->dhcpHWAddress = "ethernet ".$this->macAddress; if(!empty($this->ipHostNumber)){ $this->dialog->statements['fixed-address'] = $this->ipHostNumber; } @@ -535,6 +535,16 @@ class termDNS extends plugin /* New entry */ if($this->dhcpEnabled){ + /* Write mac address to dhcp settings */ + if($this->dhcp_is_Account){ + if(!isset($this->dhcpHostEntry['dhcpHWAddress'][0]) || + !preg_match("/ethernet ".$this->macAddress."/",$this->dhcpHostEntry['dhcpHWAddress'][0])){ + $this->dhcpHostEntry['dhcpHWAddress'] = array("ethernet ".$this->macAddress); + $this->dhcpHostEntry['MODIFIED'] = TRUE; + } + } + + /* Unset dhcpStatements if this attribute is empty */ if(isset($this->dhcpHostEntry['dhcpStatements']) && ($this->dhcpHostEntry['dhcpStatements'] == "" || count($this->dhcpHostEntry['dhcpStatements']) == 0) ){ -- 2.30.2