}
if (protoval == 'static') {
- if (L.hasSystemFeature('odhcpd')) {
- so = ss.taboption('ipv4', form.RichListValue, 'dhcpv4', _('DHCPv4 Service'),
- _('Enable or disable DHCPv4 services on this interface (odhcpd only).'));
- so.optional = true;
- so.value('', _('disabled'),
- _('Do not provide DHCPv4 services on this interface.'));
- so.value('server', _('enabled'),
- _('Provide DHCPv4 services on this interface.'));
- }
-
- so = ss.taboption('ipv4', form.Value, 'start', _('Start', 'DHCP IP range start address'), _('Lowest leased address as offset from the network address.'));
- so.optional = true;
- so.datatype = 'or(uinteger,ip4addr("nomask"))';
- so.default = '100';
-
- so = ss.taboption('ipv4', form.Value, 'limit', _('Limit'), _('Maximum number of leased addresses.'));
- so.optional = true;
- so.datatype = 'uinteger';
- so.default = '150';
+ so = ss.taboption('general', form.Flag, 'dynamicdhcp', _('Dynamic <abbr title="Dynamic Host Configuration Protocol">DHCP</abbr>'), _('Dynamically allocate DHCP addresses for clients. If disabled, only clients having static leases will be served.'));
+ so.default = so.enabled;
so = ss.taboption('general', form.Value, 'leasetime', _('Lease time'), _('Expiry time of leased addresses, minimum is 2 minutes (<code>2m</code>).'));
so.optional = true;
return _("Invalid DHCP lease time format. Use integer values optionally followed by s, m, h, d, or w.");
}
- so = ss.taboption('general', form.Flag, 'dynamicdhcp', _('Dynamic <abbr title="Dynamic Host Configuration Protocol">DHCP</abbr>'), _('Dynamically allocate DHCP addresses for clients. If disabled, only clients having static leases will be served.'));
- so.default = so.enabled;
-
if (L.hasSystemFeature('dnsmasq')) {
ss.taboption('general', form.Flag, 'force', _('Force'),
_('Force DHCP on this network even if another server is detected (dnsmasq only).'));
}
- // XXX: is this actually useful?
- //ss.taboption('advanced', form.Value, 'name', _('Name'), _('Define a name for this network.'));
+ if (L.hasSystemFeature('dnsmasq')) {
+ ss.taboption('general', form.DynamicList, 'dhcp_option', _('DHCP-Options'),
+ _('Define additional DHCP options, for example "<code>6,192.168.2.1,192.168.2.2</code>" which advertises different DNS servers to clients (dnsmasq only).'));
+ }
+
+ if (L.hasSystemFeature('odhcpd')) {
+ so = ss.taboption('ipv4', form.RichListValue, 'dhcpv4', _('DHCPv4 Service'),
+ _('Enable or disable DHCPv4 services on this interface (odhcpd only).'));
+ so.optional = true;
+ so.value('', _('disabled'),
+ _('Do not provide DHCPv4 services on this interface.'));
+ so.value('server', _('enabled'),
+ _('Provide DHCPv4 services on this interface.'));
+ }
+
+ so = ss.taboption('ipv4', form.Value, 'start', _('Start', 'DHCP IP range start address'), _('Lowest leased address as offset from the network address.'));
+ so.optional = true;
+ so.datatype = 'or(uinteger,ip4addr("nomask"))';
+ so.default = '100';
+
+ so = ss.taboption('ipv4', form.Value, 'limit', _('Limit'), _('Maximum number of leased addresses.'));
+ so.optional = true;
+ so.datatype = 'uinteger';
+ so.default = '150';
if (L.hasSystemFeature('dnsmasq')) {
so = ss.taboption('ipv4', form.Value, 'netmask', _('<abbr title="Internet Protocol Version 4">IPv4</abbr>-Netmask'),
return form.Value.prototype.validate.apply(this, [ section_id, value ]);
};
}
-
- if (L.hasSystemFeature('dnsmasq')) {
- ss.taboption('general', form.DynamicList, 'dhcp_option', _('DHCP-Options'),
- _('Define additional DHCP options, for example "<code>6,192.168.2.1,192.168.2.2</code>" which advertises different DNS servers to clients (dnsmasq only).'));
- }
}