Merge pull request #3625 from ldir-EDB0/master

luci-app-wol: use uci etherwake default interface
This commit is contained in:
Jo-Philipp Wich 2020-02-12 17:28:51 +01:00 committed by GitHub
commit 817736299e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
'use strict';
'require uci';
'require fs';
'require ui';
'require rpc';
@ -18,7 +19,8 @@ return L.view.extend({
return Promise.all([
L.resolveDefault(fs.stat('/usr/bin/etherwake')),
L.resolveDefault(fs.stat('/usr/bin/wol')),
this.callHostHints()
this.callHostHints(),
uci.load('etherwake')
]);
},
@ -48,6 +50,7 @@ return L.view.extend({
o = s.option(widgets.DeviceSelect, 'iface', _('Network interface to use'),
_('Specifies the interface the WoL packet is sent on'));
o.default = uci.get('etherwake', 'setup', 'interface');
o.rmempty = false;
o.noaliases = true;
o.noinactive = true;