From: hickert Date: Wed, 10 Oct 2007 12:25:22 +0000 (+0000) Subject: Applied patch from ticket 187 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9b19692f95b4a853a8214774bfcc65ea0d7632ad;p=gosa.git Applied patch from ticket 187 git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7490 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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) ){