Skip to content

Preserve failures during MerlinAU self-update - #606

Merged
ExtremeFiretop merged 1 commit into
ExtremeFiretop:devfrom
maghuro:fix/script-update-partial-failure
Sep 24, 2026
Merged

ExtremeFiretop merged 1 commit into
ExtremeFiretop:devfrom
maghuro:fix/script-update-partial-failure

Conversation

@maghuro

@maghuro maghuro commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix _DownloadScriptFiles_() so that a failed file download cannot be masked by a later successful download.

Problem

retCode is currently overwritten on every successful download.

For example:

  1. version.txt download fails -> retCode=1
  2. MerlinAU.asp succeeds -> retCode=0
  3. MerlinAU.sh succeeds -> retCode=0

The function therefore returns success even though the update was only partially successful.

The same problem exists if the WebUI file fails but the final script download succeeds.

This may cause _SCRIPT_UPDATE_() to report that the MerlinAU files were successfully updated when one of the required downloads actually failed.

Fix

Initialize retCode=0 once at the beginning of _DownloadScriptFiles_().

Successful downloads no longer reset the return code. Any download failure sets retCode=1, and that failure state is preserved for the remainder of the operation.

Result

  • all downloads succeed -> returns 0
  • version.txt fails -> returns 1
  • MerlinAU.asp fails -> returns 1
  • MerlinAU.sh fails -> returns 1
  • multiple downloads fail -> returns 1

No download, installation, WebUI remount, or firmware-update behavior is otherwise changed.

Scope

This PR intentionally contains only the return-status fix in _DownloadScriptFiles_().

@maghuro
maghuro force-pushed the fix/script-update-partial-failure branch from dc1389f to 63e4df3 Compare September 24, 2026 00:48

@ExtremeFiretop ExtremeFiretop left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, approved and merging.

@ExtremeFiretop

ExtremeFiretop commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Nice catch @maghuro !!! Thanks for the help :)
Merged.

@ExtremeFiretop
ExtremeFiretop merged commit d39d4f6 into ExtremeFiretop:dev Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants