From 493a2553e15c4280526647c901ccf93a4ce30488 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 25 Nov 2009 11:57:58 +0000 Subject: [PATCH] removed host-name (needs to be added to fixed IP) --- lam/lib/modules/dhcp_settings.inc | 34 ------------------------------- 1 file changed, 34 deletions(-) diff --git a/lam/lib/modules/dhcp_settings.inc b/lam/lib/modules/dhcp_settings.inc index 025454a4..bd592402 100644 --- a/lam/lib/modules/dhcp_settings.inc +++ b/lam/lib/modules/dhcp_settings.inc @@ -120,9 +120,6 @@ class dhcp_settings extends baseModule { ) , 'subnet' => array( "Headline" => _("Subnet"), "Text" => _("The name of the subnet. Example: 192.168.10.0") - ) , 'host-name' => array( - "Headline" => _("Host name"), - "Text" => _("The host name of this entry.") ) , 'leasetime' => array( "Headline" => _("Lease time"), "Text" => _("The lease time specifies after how many seconds the client should request a new IP address.") @@ -227,12 +224,6 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I ); // upload fields $return['upload_columns'] = array( - array( - 'name' => 'dhcp_settings_host-name', - 'description' => _('Host name'), - 'help' => 'host-name', - 'example' => _('server01'), - ), array( 'name' => 'dhcp_settings_subnet', 'description' => _('Subnet'), @@ -330,8 +321,6 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I $this->messages['domainname'][3] = array('ERROR', _('Account %s:') . ' dhcp_settings_domainName', _('The domain name needs to be shorter than 15 characters.')); $this->messages['domainname'][4] = array('ERROR', _('Account %s:') . ' dhcp_settings_domainName', _('The domain name needs to have at least 3 characters.')); $this->messages['domainname'][5] = array('ERROR', _('Account %s:') . ' dhcp_settings_domainName', _('The domain name includes invalid characters. Valid characters are A-Z, a-z, 0-9, ".", "_","-".')); - $this->messages['host-name'][0] = array('ERROR', _('Host name'), _('Host name contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !')); - $this->messages['host-name'][1] = array('ERROR', _('Account %s:') . ' dhcp_settings_host-name', _('Host name contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !')); } /* This function returns an array with 4 entries: @@ -482,13 +471,6 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I $this->setDHCPOption('netbios-node-type', $_POST['netbios_node_type']); if ($this->getAccountContainer()->dn_orig!=$_SESSION['config']->get_suffix('dhcp')) { - // check host name - if ($_POST['host-name'] != '') { - if (!get_preg($_POST['host-name'], 'hostname')) { - $errors[] = $this->messages['host-name'][0]; - } - } - $this->setDHCPOption('host-name', '"' . $_POST['host-name'] . '"'); // Check subnet $_POST['subnet'] = trim($_POST['subnet']); if (!check_ip($_POST['subnet'], true)) { @@ -543,11 +525,6 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I array('kind' => 'help', 'value' => 'subnet')); } else { - // host name - $return[] = array( - array('kind' => 'text', 'text' => _('Host name') . ": "), - array('kind' => 'input', 'name' => 'host-name', 'value' => $this->getDHCPOption('host-name')), - array('kind' => 'help', 'value' => 'host-name')); $return[] = array( array('kind' => 'text', 'text' => _('Subnet') . ":* "), array('kind' => 'input', 'name' => 'cn', 'value' => $this->attributes['cn'][0]), @@ -818,17 +795,6 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I // add object class if (!in_array("dhcpOptions", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "dhcpOptions"; if (!in_array("dhcpSubnet", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "dhcpSubnet"; - // host name - if ($rawAccounts[$i][$ids['dhcp_settings_host-name']] != '') { - if (get_preg($rawAccounts[$i][$ids['dhcp_settings_host-name']], 'hostname')) { - $partialAccounts[$i]['dhcpOption'][] = 'host-name "' . $rawAccounts[$i][$ids['dhcp_settings_host-name']] . '"'; - } - else { - $error = $this->messages['host-name'][1]; - array_push($error, $i); - $messages[] = $error; - } - } // subnet if (check_ip($rawAccounts[$i][$ids['dhcp_settings_subnet']],true)) { $partialAccounts[$i]['cn'] = $rawAccounts[$i][$ids['dhcp_settings_subnet']];