diff options
author | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2020-02-12 11:41:40 +0000 |
---|---|---|
committer | Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> | 2020-02-12 16:11:06 +0000 |
commit | 9cfd3ac1e5bcc99c94c48c180a76d679e6c4361d (patch) | |
tree | d139b0b6578cc5bb293f0af9a4f2edee744bfda2 /applications/luci-app-wol/htdocs/luci-static | |
parent | 1e3f74211ed0c9f5e91bcd95f2ac52ee77f7d947 (diff) |
luci-app-wol: use uci etherwake default interface
Use uci config 'etherwake.setup.interface' to default WOL interface
selection.
On some devices the lan interface is not the first item in the drop down
interface selection list. Configuring this parameter allows the user to
set a preferred interface to be used/selected.
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'applications/luci-app-wol/htdocs/luci-static')
-rw-r--r-- | applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js b/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js index aeecd54fcf..cafed753c9 100644 --- a/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js +++ b/applications/luci-app-wol/htdocs/luci-static/resources/view/wol.js @@ -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; |