X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=gosa-plugins%2Fsystems%2Fadmin%2Fsystems%2Fclass_termDNS.inc;h=e08e9afddb7c0dde791fc1c558a1654b362fd9e8;hb=f12547c4b6640b7de58b3474ba5c42e756233de0;hp=62d6f6890ad2869ddc9922669a66e36c3a4ba5fd;hpb=42cc6cd45faadb3b8315f9aa28b756536b21cc0d;p=gosa.git diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index 62d6f6890..e08e9afdd 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -156,9 +156,10 @@ class termDNS extends plugin */ $this->dnsEntry = DNS::getDNSHostEntries($config,$this->OrigCn); + $ptr = DNS::FlipIp($this->get_pTRRecord()); + /* Remove A record which equals $this->ipHostNumber */ - $ptr = $this->get_pTRRecord(); foreach($this->dnsEntry['RECORDS'] as $key => $rec){ if(($rec['type'] == "aRecord") && ($rec['value'] == $this->ipHostNumber)){ unset($this->dnsEntry['RECORDS'][$key]); @@ -750,6 +751,15 @@ class termDNS extends plugin if(count($this->dhcpHostEntry['dhcpOption']) == 0){ $this->dhcpHostEntry['dhcpOption']= array("host-name ".$this->cn); } + }else{ + + // Updated Host-Name entry + foreach($this->dhcpHostEntry['dhcpOption'] as $key => $entry){ + if(preg_match("/^host-name/", $entry)){ + $this->dhcpHostEntry['dhcpOption'][$key] = "host-name ".$this->cn; + break; + } + } } /* Write mac address to dhcp settings */