mirror of https://github.com/OpenIPC/firmware.git
run updated sysupgrade from tmp
parent
eeab52b400
commit
4c75ce7352
|
@ -112,16 +112,16 @@ free_resources() {
|
|||
|
||||
self_update() {
|
||||
if echo ${args} | grep "rootfs" || echo ${args} | grep "kernel" > /dev/null 2>&1; then
|
||||
echo "Offline upgrade, skip sysupgrade version check."
|
||||
echo -e "\nOffline upgrade, skip sysupgrade version check."
|
||||
else
|
||||
echo "Online upgrade, checking sysupgrade version..."
|
||||
echo -e "\nOnline upgrade, checking sysupgrade version..."
|
||||
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade"
|
||||
dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='`
|
||||
if ! [ "${scr_version}" = "${dstv}" ]; then
|
||||
echo "A new version is available, trying to update..."
|
||||
mv /tmp/sysupgrade /usr/sbin/ ; chmod +x /usr/sbin/sysupgrade
|
||||
chmod +x /tmp/sysupgrade
|
||||
echo -e "Done. Restarting...\n"
|
||||
exec "$0" ${args}
|
||||
exec /tmp/sysupgrade ${args}
|
||||
exit 1
|
||||
else
|
||||
echo "Ok, version match."
|
||||
|
|
Loading…
Reference in New Issue