freifunk-berlin / falter-packages

Sources for the falter-packagefeed
GNU General Public License v3.0
13 stars 17 forks source link

falter-berlin-autoupdate: Add custom-config detection #431

Open Akira25 opened 6 months ago

Akira25 commented 6 months ago

Kompiliert Ja/Nein: (Bitte gib Prozessorarchitektur, Modell und Falter/OpenWrtversion an) Läuft live Ja/Nein: (Bitte gib Prozessorarchitektur, Modell und Falter/OpenWrtversion an und wie du deine Änderungen getestet hast)

Beschreibung deiner Änderungen:


Compile tested: no Run tested: yes, on falter 1.2.3

When updating nodes automatically, we want to detect custom changes made by the user. As nodes may brake when using non-standard config and updating, we want to avoid updating on these nodes.

pmelange commented 6 months ago

Is the uci-defaults script designed to always run when the router boots? Then it would be best to have an explicit "exit 1" at the end of the code. An "exit 0" causes the file to be deleted and anything else makes the uci-defaults script stay around for the next boot.

Akira25 commented 6 months ago

Is the uci-defaults script designed to always run when the router boots? Then it would be best to have an explicit "exit 1" at the end of the code. An "exit 0" causes the file to be deleted and anything else makes the uci-defaults script stay around for the next boot.

Not quite: The script is intended, to only run once after the wizard finished. Thus we check, wether it ran already and exit , when it hasn't.

So we make checksums of a freshly configured router and check them on autoupdate against the current ones, to detect changes in the files.