Browse Source

attendedsysupgrade-common: add package

due to various clients and the existence of rpcd-mod-rpcsys the package
rpcd-mod-attendedsysupgrade is superflous.

From now on the attendedsysupgrade-common package should be dependencie
of all kinds of clients.

Currently active or planned:
- luci-app-attendedsysupgrade
- attendedsysupgrade cli in shell
- attendedsysupgrade cli in c

Signed-off-by: Paul Spooren <paul@spooren.de>
lilik-openwrt-22.03
Paul Spooren 7 years ago
parent
commit
861e5eda86
4 changed files with 11 additions and 93 deletions
  1. +11
    -28
      utils/attendedsysupgrade-common/Makefile
  2. +0
    -0
      utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults
  3. +0
    -26
      utils/rpcd-mod-attendedsysupgrade/files/attendedsysupgrade.acl
  4. +0
    -39
      utils/rpcd-mod-attendedsysupgrade/files/attendedsysupgrade.rpcd

utils/rpcd-mod-attendedsysupgrade/Makefile → utils/attendedsysupgrade-common/Makefile View File


utils/rpcd-mod-attendedsysupgrade/files/attendedsysupgrade.defaults → utils/attendedsysupgrade-common/files/attendedsysupgrade.defaults View File


+ 0
- 26
utils/rpcd-mod-attendedsysupgrade/files/attendedsysupgrade.acl View File

@ -1,26 +0,0 @@
{
"attendedsysupgrade": {
"description": "attended sysupgrade via rpcd",
"read": {
"ubus": {
"attendedsysupgrade": [
"sysupgrade"
],
"system": [
"board"
],
"uci": [
"get"
]
},
"uci": [
"*"
]
},
"write": {
"cgi-io": [
"upload"
]
}
}
}

+ 0
- 39
utils/rpcd-mod-attendedsysupgrade/files/attendedsysupgrade.rpcd View File

@ -1,39 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
case "$1" in
list)
json_init
json_add_object "sysupgrade"
json_add_boolean "keep_settings" 1
json_close_object
json_dump
;;
call)
case "$2" in
sysupgrade)
read input;
json_load "$input"
json_get_var keep_settings keep_settings
if [ -f "/tmp/sysupgrade.bin" ]; then
json_init
json_add_string "message" "starting sysupgrade"
json_dump
/etc/init.d/uhttpd stop
/etc/init.d/dropbear stop
sleep 1;
if [ "$keep_settings" -eq "0" ]; then
keep_settings_param="-n"
fi
/sbin/sysupgrade $keep_settings_param /tmp/sysupgrade.bin
fi
json_init
json_add_string "message" "could not find /tmp/sysupgrade.bin"
json_dump
esac
;;
esac

Loading…
Cancel
Save