mirror of https://github.com/OpenIPC/firmware.git
fix missing
parent
befd9e4f83
commit
14e7dc6ebc
|
@ -112,19 +112,19 @@ free_resources() {
|
||||||
|
|
||||||
self_update() {
|
self_update() {
|
||||||
if echo ${args} | grep "rootfs" || echo ${args} | grep "kernel" > /dev/null 2>&1; then
|
if echo ${args} | grep "rootfs" || echo ${args} | grep "kernel" > /dev/null 2>&1; then
|
||||||
echo "Offline upgrade, skip sysupgrade version check."
|
echo "Offline upgrade, skip sysupgrade version check."
|
||||||
else
|
else
|
||||||
echo "Online upgrade, checking sysupgrade version..."
|
echo "Online upgrade, checking sysupgrade version..."
|
||||||
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/cronyx/firmware/master/general/overlay/usr/sbin/sysupgrade"
|
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/cronyx/firmware/master/general/overlay/usr/sbin/sysupgrade"
|
||||||
dstv=`grep scr_version /tmp/sysupgrade | cut -f 2 -d '='`
|
dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='`
|
||||||
if ! [ "${scr_version}" = "${dstv}" ]; then
|
if ! [ "${scr_version}" = "${dstv}" ]; then
|
||||||
echo "A new version is available, trying to update..."
|
echo "A new version is available, trying to update..."
|
||||||
mv /tmp/sysupgrade /usr/sbin/ ; chmod +x /usr/sbin/sysupgrade
|
mv /tmp/sysupgrade /usr/sbin/ ; chmod +x /usr/sbin/sysupgrade
|
||||||
echo "Done. Try running sysupgrade again."
|
echo "Done. Try running sysupgrade again."
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo "Ok, version match."
|
echo "Ok, version match."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue