summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c18b1af)
raw | patch | inline | side by side (parent: c18b1af)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 18 Sep 2009 07:26:18 +0000 (07:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 18 Sep 2009 07:26:18 +0000 (07:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14286 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc | patch | blob | history | |
gosa-plugins/opsi/admin/opsi/generic.tpl | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc b/gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc
index 6aec6c21a421b1de0c3fedd4b3a55ee6c411dfe9..52c4ed89f2433ec20f802e8168c7e04cb5126c59 100644 (file)
/* Try to plugin */
$this->init();
-
- // Now fake a valid ldap entry ... this is necessary to avoid
- // modifications in the dns/dhcp classes
-
- // First fake cn
- $this->attrs['hostId'][0] = $this->hostId;
- $this->attrs['cn'][0] = $this->hostId;
-
- // Second detect DNS settings.
- $ldap = $this->config->get_ldap_link();
- $ldap->cd($this->config->current['BASE']);
- $strippedHostId = preg_replace("/\..*$/","",$this->hostId);
- $ldap->search("(&(objectClass=dNSZone)(|(relativeDomainName=".$this->hostId.")(relativeDomainName=".$strippedHostId."))(aRecord=*))",array("aRecord"));
- if($ldap->count()){
- $attrs = $ldap->fetch();
- $this->attrs['ipHostNumber']['count'] = 0;
- $this->attrs['ipHostNumber'][0] = $attrs['aRecord'][0];
- }
-
- // Initialize DHCP and DNS
- $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, FALSE, "hostId");
- $this->netConfigDNS->set_acl_category("opsi");
- $this->netConfigDNS->set_acl_base($this->config->current['BASE']);
- $this->netConfigDNS->IPisMust = FALSE;
- $this->netConfigDNS->MACisMust = FALSE;
}
if(empty($this->s_selectedNetbootProduct)){
$this->s_selectedNetbootProduct = key($this->a_availableNetbootProducts);
}
+
+ // Now fake a valid ldap entry ... this is necessary to avoid
+ // modifications in the dns/dhcp classes
+
+ // First fake cn
+ $this->attrs['hostId'][0] = $this->hostId;
+ $this->attrs['cn'][0] = $this->hostId;
+
+ // Second detect DNS settings.
+ $ldap = $this->config->get_ldap_link();
+ $ldap->cd($this->config->current['BASE']);
+ $strippedHostId = preg_replace("/\..*$/","",$this->hostId);
+ $ldap->search("(&(objectClass=dNSZone)(|(relativeDomainName=".$this->hostId.")(relativeDomainName=".$strippedHostId."))(aRecord=*))",array("aRecord"));
+ if($ldap->count()){
+ $attrs = $ldap->fetch();
+ $this->attrs['ipHostNumber']['count'] = 0;
+ $this->attrs['ipHostNumber'][0] = $attrs['aRecord'][0];
+ }
+
+ $this->attrs['macAddress']['count'] = 1;
+ $this->attrs['macAddress'][0] = &$this->mac;
+
+ // Initialize DHCP and DNS
+ $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, FALSE, "hostId");
+ $this->netConfigDNS->set_acl_category("opsi");
+ $this->netConfigDNS->set_acl_base($this->config->current['BASE']);
+ $this->netConfigDNS->IPisMust = FALSE;
+ $this->netConfigDNS->MACisMust = FALSE;
}
}
plugin::save_object();
$this->netConfigDNS->save_object();
-
+ $this->mac = $this->netConfigDNS->macAddress;
+
/* Get hostId
*/
if(isset($_POST['hostId']) && $this->standalone && $this->acl_is_writeable("hostId")){
index 1a40e95ad4c6883bb68a6c91ddcc452e65012570..7ecf8c37e1d1cfd78ce27e56cd44253fb8a2d901 100644 (file)
{/render}
</td>
</tr>
+<!--
<tr>
<td>{t}MAC address{/t}{$must}</td>
<td>
{render acl=$macACL}
- <input type='text' name="mac" value="{$mac}">
+ <input type='text' name="dummy" value="{$mac}" disabled>
{/render}
</td>
</tr>
+-->
{else}
<tr>
<td>{t}Name{/t}</td>
{/render}
</td>
</tr>
+<!--
<tr>
<td>{t}MAC address{/t}{$must}</td>
<td>
{/render}
</td>
</tr>
+-->
{/if}
<tr>
<td>{t}Netboot product{/t}</td>