diff options
author | Paul Spooren <paul@spooren.de> | 2017-10-21 17:01:07 +0200 |
---|---|---|
committer | Paul Spooren <spooren@informatik.uni-leipzig.de> | 2017-11-04 19:25:10 +0100 |
commit | 26c93debe9540412df464f200a7b4d5c7e8d2ac7 (patch) | |
tree | f5d20470e29cd5035f81b56e0f1ea65d855f88cb /applications/luci-app-attendedsysupgrade/root | |
parent | 9e325a5162296964661c60e9ccecb134936b4ec6 (diff) |
luci-app-attendedsysupgrade: upgrade to version 2
Add required ubus acls from package rpcd-mod-attendedsysupgrade.
luci-app-attendedsysupgrade: add postinst script
removes caches and restarts uhttpd as mentioned here:
https://github.com/aparcar/gsoc17-attended-sysupgrade/issues/58#issuecomment-339370803
luci-app-attendedsysupgrade: redesign
simplified the interface and made it more "luci" like
simplify ubus interaction, use uci_call und ubus_call functions
add optional settings:
auto_search:
search on opening the view without clicking
advanced_mode:
if set, allow package edits, show build log
rename updateserver to upgradeserver
rename url to server_url
luci-app-attendedsysupgrade: rename uci options
remove leading "upgrade" from uci options
also rename server_url to url
cleaning
use new api/ urls
wait for successfull reboot
Signed-off-by: Paul Spooren <paul@spooren.de>
Diffstat (limited to 'applications/luci-app-attendedsysupgrade/root')
2 files changed, 32 insertions, 0 deletions
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 new file mode 100755 index 000000000..832744f7d --- /dev/null +++ b/applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade @@ -0,0 +1,6 @@ +#!/bin/sh + +rm -rf /tmp/luci-indexcache /tmp/luci-modulecache/ +/etc/init.d/uhttpd restart + +return 0 diff --git a/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json b/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json new file mode 100644 index 000000000..85d6e94a2 --- /dev/null +++ b/applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json @@ -0,0 +1,26 @@ +{ + "attendedsysupgrade": { + "description": "attended sysupgrade via rpcd and luci", + "read": { + "ubus": { + "attendedsysupgrade": [ + "sysupgrade" + ], + "system": [ + "board" + ], + "uci": [ + "get" + ] + }, + "uci": [ + "*" + ] + }, + "write": { + "cgi-io": [ + "upload" + ] + } + } +} |