flashrom system updates

- fix bugs
- more WNI-like flow path
- make scripts use `service_name` variable so that they should work in a renamed service (eg not wtv-flashrom, untested)
This commit is contained in:
zefie
2021-08-09 18:16:54 -04:00
parent 7ae8fdc816
commit a078e58ce0
6 changed files with 26 additions and 27 deletions

View File

@@ -1,8 +1,8 @@
if (request_headers.query.path) {
var url = "wtv-flashrom:/get-lc2-page?path=" + request_headers.query.path;
var url = service_name + ":/get-lc2-page?path=" + request_headers.query.path;
var romtype = ssid_sessions[socket.ssid].get("wtv-client-rom-type");
if (romtype == "bf0app") {
url = "client:updateflash?ipaddr=" + minisrv_config.services[service_name].host + "&port=" + minisrv_config.services[service_name].port + "&path=" + escape(url.replace("get-lc2-page", "get-by-path"));
url = "client:updateflash?ipaddr=" + minisrv_config.services[service_name].host + "&port=" + minisrv_config.services[service_name].port + "&path=" + escape(service_name + ":/" +request_headers.query.path);
if (request_headers.query.numparts) url += escape("&numparts=" + request_headers.query.numparts);
}
headers = "300 OK\n";