From 26c93debe9540412df464f200a7b4d5c7e8d2ac7 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sat, 21 Oct 2017 17:01:07 +0200 Subject: 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 --- .../luasrc/view/attendedsysupgrade.htm | 440 +++++++++++---------- .../etc/uci-defaults/40_luci-attendedsysupgrade | 6 + .../usr/share/rpcd/acl.d/attendedsysupgrade.json | 26 ++ 3 files changed, 258 insertions(+), 214 deletions(-) create mode 100755 applications/luci-app-attendedsysupgrade/root/etc/uci-defaults/40_luci-attendedsysupgrade create mode 100644 applications/luci-app-attendedsysupgrade/root/usr/share/rpcd/acl.d/attendedsysupgrade.json (limited to 'applications') diff --git a/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm b/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm index d04745abd..e1f715daa 100644 --- a/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm +++ b/applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm @@ -75,39 +75,43 @@ %> <%+header%>

<%:Attended Sysupgrade%>

-
- - +
+ Easily search and install new releases and package upgrades. Sysupgrade images are created on demand based on locally installed packages.
+ + +

- - -

-

- -

-

- +

- -
- -
- - +
+
+
+ + +
+
+ +
+
+
+
+
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" + ] + } + } +} -- cgit v1.2.3