fff-sysupgrade/fff-web: Free cache before upgrade

This might reduce the chance to break devices with 32 MB RAM
during sysupgrade.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Adrian Schmutzler 2018-12-05 19:26:58 +01:00
parent 9e6b4c6982
commit 518c0d6fef
2 changed files with 6 additions and 0 deletions

View File

@ -97,6 +97,10 @@ else
read -p "sha256 sums correct. Should I start upgrading the firmware (y/N)? " yn
case $yn in
[Yy]*|[Jj]*)
echo ""
echo "Freeing caches ..."
echo 3 > /proc/sys/vm/drop_caches
echo ""
echo "Starting firmware upgrade. Don't touch me until I reboot."
echo ""

View File

@ -70,6 +70,8 @@ if [ "$do_reset" = "1" ] ; then
echo "</pre>"
elif [ "$do_sysupgrade" = "1" ] ; then
echo "<pre>"
echo "# Freeing caches ..."
echo 3 > /proc/sys/vm/drop_caches
echo "# sysupgrade $args $HASERL_firmware_path"
sysupgrade $args $HASERL_firmware_path
echo "</pre>"