Code

Fixed ip change problem
[gosa.git] / plugins / admin / systems / class_termDNS.inc
index 274424ab5180bf77f548ce68faa0edea308341b4..252d990625785d8aed6e22230306bff37097b08f 100644 (file)
@@ -565,6 +565,15 @@ class termDNS extends plugin
         }
       }
   
+      /* Updated IP host number */
+      if($this->dhcp_is_Account){
+        foreach($this->dhcpHostEntry['dhcpStatements'] as $id => $value){
+          if(preg_match("/^fixed-address/",$value)){
+            $this->dhcpHostEntry['dhcpStatements'][$id] = "fixed-address ".$this->ipHostNumber;
+            $this->dhcpHostEntry['MODIFIED'] = TRUE;
+          }
+        }
+      }
 
       /* Unset dhcpStatements if this attribute is empty  */
       if(isset($this->dhcpHostEntry['dhcpStatements']) &&