From c72c78bed979f2d85a3c71fe8c7ab26aefe8bae2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 31 Oct 2019 17:37:55 +0100 Subject: luci-mod-network: interfaces.js: issue iface restart via file/exec rpc call Signed-off-by: Jo-Philipp Wich --- .../htdocs/luci-static/resources/view/network/interfaces.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/luci-mod-network/htdocs/luci-static/resources/view') diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index bfff2575bd..60d61adfec 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -1,4 +1,5 @@ 'use strict'; +'require fs'; 'require uci'; 'require form'; 'require network'; @@ -934,11 +935,9 @@ return L.view.extend({ if (dsc.getAttribute('reconnect') == '') { dsc.setAttribute('reconnect', '1'); - tasks.push(L.Request.post( - L.url('admin/network/iface_reconnect', section_ids[i]), - 'token=' + L.env.token, - { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } - ).catch(function() {})); + tasks.push(fs.exec('/sbin/ifup', [section_ids[i]]).catch(function(e) { + L.ui.addNotification(null, E('p', e.message)); + })); } else if (dsc.getAttribute('disconnect') == '' || dsc.getAttribute('disconnect') == 'force') { var force = dsc.getAttribute('disconnect'); -- cgit v1.2.3