mirror of https://github.com/OpenIPC/firmware.git
auto restart sysupgrade after self update
parent
14e7dc6ebc
commit
d944a2c130
|
@ -120,8 +120,9 @@ self_update() {
|
||||||
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. Restarting..."
|
||||||
exit 0
|
exec "$0" ${args}
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Ok, version match."
|
echo "Ok, version match."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue