mirror of
https://git.openwrt.org/feed/packages.git
synced 2024-06-15 11:53:59 +02:00
![Paul Spooren](/assets/img/avatar_default.png)
add ubus call to perform a sysupgrade and acl file for the attended sysupgrade use case as well uci defaults. Package is a part of the GSoC 17 project implementing easy sysupgrade functionality. Signed-off-by: Paul Spooren <paul@spooren.de>
30 lines
502 B
Bash
Executable File
30 lines
502 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /usr/share/libubox/jshn.sh
|
|
|
|
case "$1" in
|
|
list)
|
|
json_init
|
|
|
|
json_add_object "sysupgrade"
|
|
json_close_object
|
|
|
|
json_dump
|
|
;;
|
|
call)
|
|
case "$2" in
|
|
sysupgrade)
|
|
if [ -f "/tmp/sysupgrade.bin" ]; then
|
|
/etc/init.d/uhttpd stop
|
|
/etc/init.d/dropbear stop
|
|
sleep 1;
|
|
/sbin/sysupgrade -c /tmp/sysupgrade.bin
|
|
fi
|
|
json_init
|
|
json_add_string "message" "could not find /tmp/sysupgrade.bin"
|
|
json_dump
|
|
esac
|
|
;;
|
|
esac
|
|
|