diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index e096867f73a08e60f3e0f6a56c8825827143a65a..8b34d8278bc664254873358c65f8810cde67120e 100644 (file)
{
/* Call common method to give check the hook */
$message= plugin::check();
- $message= array_merge($message, $this->netConfigDNS->check());
+
+ /* Skip IP & Mac checks if this is a template */
+ if($this->cn != "wdefault"){
+ $message= array_merge($message, $this->netConfigDNS->check());
+ }
$this->dn= "cn=".$this->cn.",ou=workstations,ou=systems,".$this->base;
if ($this->orig_dn != $this->dn){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);
- $ldap->search ("(&(cn=".$this->cn.")(objectClass=gotoWorkstation))", array("cn"));
+
+ if($this->cn == "wdefault"){
+ $ldap->cat($this->dn);
+ }else{
+ $ldap->search ("(&(cn=".$this->cn.")(objectClass=gotoWorkstation))", array("cn"));
+ }
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if (preg_match ("/,ou=incoming,/", $ldap->getDN())){
}
}
}
-
+
/* Check for valid ntpServer selection */
if((!$this->inheritTimeServer) && (!count($this->gotoNtpServer))){
$message[]= _("There must be at least one NTP server selected, or the inherit mode activated.");
$this->handle_post_events("modify");
}
}
+
+ /* cn=default and macAddress=- indicates that this is a template */
+ if($this->cn == "wdefault"){
+ $this->netConfigDNS->macAddress = "-";
+ }
+
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));