luci-base: add default value options dhcp hostname
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
9da9777a94
commit
fd75c2b7c5
1 changed files with 3 additions and 0 deletions
|
@ -20,6 +20,9 @@ return network.registerProtocol('dhcp', {
|
||||||
var dev = this.getL2Device() || this.getDevice(), o;
|
var dev = this.getL2Device() || this.getDevice(), o;
|
||||||
|
|
||||||
o = s.taboption('general', form.Value, 'hostname', _('Hostname to send when requesting DHCP'));
|
o = s.taboption('general', form.Value, 'hostname', _('Hostname to send when requesting DHCP'));
|
||||||
|
o.default = '';
|
||||||
|
o.value('', 'Send the hostname of this device');
|
||||||
|
o.value('*', 'Do not send a hostname');
|
||||||
o.datatype = 'or(hostname, "*")';
|
o.datatype = 'or(hostname, "*")';
|
||||||
o.load = function(section_id) {
|
o.load = function(section_id) {
|
||||||
return callFileRead('/proc/sys/kernel/hostname').then(L.bind(function(hostname) {
|
return callFileRead('/proc/sys/kernel/hostname').then(L.bind(function(hostname) {
|
||||||
|
|
Loading…
Reference in a new issue