From 5949c2cea82a2b636ce55ac87c7947ee918c36ce Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Wed, 7 Mar 2018 12:16:17 +0100 Subject: luci-app-attendedsysupgrade: reload rpcd fix #1668 when installing the luci app and opening it for the first time the webinterface shows an error as some freshly installed rpcd calls are not yet available. The reload fixes the problem. luci-app-attendedsysupgrade: downloadable image the creted sysupgrade image can now easily be downloaded via web interface. also fixed some
to
Signed-off-by: Paul Spooren --- .../root/etc/uci-defaults/40_luci-attendedsysupgrade | 1 + .../root/www/luci-static/resources/attendedsysupgrade.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'applications/luci-app-attendedsysupgrade/root') diff --git a/applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade b/applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade index 832744f7d8..1b890c0cbb 100755 --- a/applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade +++ b/applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade @@ -2,5 +2,6 @@ rm -rf /tmp/luci-indexcache /tmp/luci-modulecache/ /etc/init.d/uhttpd restart +/etc/init.d/rpcd reload return 0 diff --git a/applications/luci-app-attendedsysupgrade/root/www/luci-static/resources/attendedsysupgrade.js b/applications/luci-app-attendedsysupgrade/root/www/luci-static/resources/attendedsysupgrade.js index 9b67faf515..604074ad37 100644 --- a/applications/luci-app-attendedsysupgrade/root/www/luci-static/resources/attendedsysupgrade.js +++ b/applications/luci-app-attendedsysupgrade/root/www/luci-static/resources/attendedsysupgrade.js @@ -128,7 +128,7 @@ function ubus_call(command, argument, params, variable) { } } } else { - error_box("Ubus call faild:
Request: " + request_json + "
Response: " + JSON.stringify(response)) + error_box("Ubus call faild:
Request: " + request_json + "
Response: " + JSON.stringify(response)) } ubus_closed++; } @@ -180,7 +180,7 @@ function upgrade_check_callback(request_text) { if(request_json.upgrades != undefined) { info_output += "

Package upgrades available

" for (upgrade in request_json.upgrades) { - info_output += "" + upgrade + ": " + request_json.upgrades[upgrade][1] + " to " + request_json.upgrades[upgrade][0] + "
" + info_output += "" + upgrade + ": " + request_json.upgrades[upgrade][1] + " to " + request_json.upgrades[upgrade][0] + "
" } } data.packages = request_json.packages @@ -231,9 +231,9 @@ function upgrade_request_callback(request) { var filename_split = data.sysupgrade_url.split("/") data.filename = filename_split[filename_split.length - 1] - info_output = "Firmware created
" + data.filename + "" + info_output = 'Firmware created: ' + data.filename + '' if(data.advanced_mode == 1) { - info_output += '
Build log' + info_output += '
Build log' } info_box(info_output); @@ -378,7 +378,7 @@ function server_request(request_dict, path, callback) { } else if (request.status === 500) { request_json = JSON.parse(request_text) - error_box_content = "Internal server error
" + error_box_content = "Internal server error
" error_box_content += request_json.error if(request_json.log != undefined) { data.log_url = request_json.log -- cgit v1.2.3