Skip to content
Snippets Groups Projects
Commit dbd8607b authored by Adrian Schmutzler's avatar Adrian Schmutzler Committed by Fabian Bläse
Browse files

upgrade.html: Rename uploaded firmware before sysupgrade


At the moment sysupgrade via WebUI is broken on many devices.
This is reproducible: While the (few) status messages seem
normal, the device boots again with the old firmware.
Sysupgrade via SSH always works.

The sysupgrade call in upgrade.html directly uses the path of
the uploaded firmware file as argument. From several tests and
based on caught stdout/stderr from this line, it looks like haserl
deletes the uploaded firmware file due to a hidden trigger before
or even while it is processed by sysupgrade.

The easiest way to work around that is to just rename the file
before using it as argument to sysupgrade. This will preserve the
file DURING sysupgrade. If sysupgrade fails explicitly (status
code != 0), remove the file to provide sufficient memory for
another upload.

Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: default avatarFabian Bläse <fabian@blaese.de>
Reviewed-by: default avatarRobert Langhammer <rlanghammer@web.de>
parent 590dbca7
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment