gluon-autoupdater: drop caches before upgrade
This will free about 5 to 12 MB of RAM even on lightly used devices yielding plenty of RAM for autoupdate to succeed.
This commit is contained in:
parent
3712f8795c
commit
6a2e7d45d8
@ -138,6 +138,10 @@ autoupdate() {
|
|||||||
if newer_than "$fw_version" "$my_version"; then
|
if newer_than "$fw_version" "$my_version"; then
|
||||||
echo "New version available"
|
echo "New version available"
|
||||||
|
|
||||||
|
# drop caches to make room for firmware image
|
||||||
|
sync
|
||||||
|
sysctl -w vm.drop_caches=3
|
||||||
|
|
||||||
local fw_image=$(mktemp)
|
local fw_image=$(mktemp)
|
||||||
fetch_firmware $MIRROR $fw_image || { rm -f $fw_image; return 1; }
|
fetch_firmware $MIRROR $fw_image || { rm -f $fw_image; return 1; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user