Commit 44eee8b9 authored by Franco Fichtner's avatar Franco Fichtner

firmware: reconfigure on reload; kill backend webgui call

Backend can't call tainted code that may run configd again.  This needs
to be cleaned up.  Ideally, the backend should only call python code.

(cherry picked from commit 4f43181d)
parent 96856c37
......@@ -5,14 +5,16 @@ require_once('config.inc');
require_once('interfaces.inc');
require_once('captiveportal.inc');
require_once('rrd.inc');
require_once("util.inc");
require_once("system.inc");
require_once('util.inc');
require_once('system.inc');
if (count($argv) > 1 && is_numeric($argv[1])) {
// starting delayed.
sleep($argv[1]);
}
system_firmware_configure();
echo 'Restarting webConfigurator...';
killbyname('lighttpd');
......
[reload|restart]
command:/usr/local/etc/rc.restart_webgui
parameters:%s
type:script
message:webConfigurator restart in progress
......@@ -206,7 +206,7 @@ if ($_POST['resetlogs'] == gettext("Reset Log Files")) {
ob_flush();
flush();
log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
configd_run("webgui restart 2", true);
mwexec_bg('/usr/local/etc/rc.restart_webgui 2');
$savemsg .= "<br />" . gettext("WebGUI process is restarting.");
}
......
......@@ -684,5 +684,5 @@ if ($restart_webgui) {
ob_flush();
flush();
log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
configd_run("webgui restart 2", true);
mwexec_bg('/usr/local/etc/rc.restart_webgui 2');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment