Skip to content

Dev 1.7.3 as Next Stable Release - #634

Merged
ExtremeFiretop merged 17 commits into
mainfrom
dev
Nov 24, 2026
Merged

ExtremeFiretop merged 17 commits into
mainfrom
dev

Conversation

@ExtremeFiretop

@ExtremeFiretop ExtremeFiretop commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Forms post update = READY
Readme update = COMPLETED
Version.txt update = COMPLETED

Dev 1.7.3 as Next Stable Release

What's Changed/Fixed?:

PR: [ #627 ] - Code Review

1. Don't wipe out the F/W directory when requesting changelogs

  • If requesting a changelog while the script was attempting to flash, it could wipe out the firmware working directory.
  • Changelog requests now preserve existing firmware files.

2. Prevent noninteractive requirements failure from uninstalling MerlinAU

  • Do not call the yes/no prompt helper during noninteractive startup since its default success result could be taken as confirmation and unintentionally trigger a full MerlinAU uninstall.
  • Noninteractive requirements failures now exit safely without invoking the uninstall path.

3. Abort firmware flash when USB eject fails

  • Detect when USB storage cannot be safely unmounted/ejected before flashing.
  • Cancel the firmware update, perform recovery cleanup, release the update lock, and reboot instead of continuing the firmware upload with mounted or busy USB storage.

4. Recognize shell-launched MerlinAU lock owners

  • Recognize MerlinAU processes launched through an explicit shell, such as the firmware update cron job using sh MerlinAU.sh run_now.
  • Verify the script path through /proc/<pid>/cmdline when the process name alone cannot identify MerlinAU, preventing active instances from being incorrectly treated as stale lock owners.

5. Harden low-memory rollback and Entware handling

  • Preserve the original Asus/TrendMicro NVRAM and service state only once so repeated low-memory checks cannot overwrite the true pre-update state with temporary disabled values.
  • Restore original TrendMicro NVRAM values before any cleanup or firmware-flash path can commit temporary low-memory settings.
  • Restore only the TrendMicro service groups that were actually running before MerlinAU disabled them.
  • Make low-memory rollback safe to invoke repeatedly without restarting services multiple times.
  • Bound Entware start and stop operations to 120 seconds and terminate a stuck rc.unslung process. Thanks to Radon for the report! https://www.snbforums.com/threads/merlinau-v1-7-2-the-ultimate-firmware-auto-updater.96306/post-1012007
  • Track the Entware stop state before invoking rc.unslung so rollback can still restore services if the Entware shutdown stalls. Thanks to Radon for the report! https://www.snbforums.com/threads/merlinau-v1-7-2-the-ultimate-firmware-auto-updater.96306/post-1012007
  • Preserve nonzero rc.unslung failures so callers can correctly detect an unsuccessful Entware operation.

6. Harden WebUI mounting and error handling

  • Stop reporting WebUI setup as successful when copying the ASP file, creating its title file, modifying the menu tree, acquiring the WebUI lock, or performing the bind mount fails.
  • Propagate those failures back to the caller while continuing to treat the absence of a previous bind mount as normal.

7. Support the split GNUton 3004 and 3006 repositories

8. Make script updates transactional

  • Download and stage version.txt, the WebUI ASP, and the MerlinAU script before replacing any installed files.
  • Leave the currently installed files untouched if any required download fails.
  • Create rollback copies before committing the staged update.
  • If a later file replacement fails, restore any files already replaced so the installed script, WebUI ASP, and version metadata remain synchronized.
  • Commit the script first, followed by the WebUI ASP, with version.txt written last as the final update marker.

9. Protect firmware preflash and upload from termination signals

  • Track whether MerlinAU is in the normal, preflash, or protected firmware-upload phase.
  • If a termination signal is received after preflash shutdown has begun, clear the firmware-update guard, release locks, and reboot instead of performing a normal exit that could leave the router with services stopped, cron jobs removed, or storage unmounted.
  • During the protected firmware upload/reboot-wait sequence, defer termination signals so the firmware-update locks cannot be released while Curl is still uploading the image.
  • Continue waiting until the Curl child has actually exited even if a trapped signal interrupts the shell wait.
  • Harden the firmware-upload watchdog by escalating a stalled Curl process from TERM to KILL after a grace period.
  • Terminate and reap the watchdog after the upload completes so it cannot later act on a reused PID.

As always, we highly recommend you update ASAP as this includes functional improvements and little bug fixes.
Thanks!

ExtremeFiretop and others added 16 commits October 19, 2026 22:30
While doing code review, I noticed that the _Mount_WebUI_ function reports success even though the copy/sed/bind-mount operations are unchecked
I am attempting to prevent noninteractive requirements failure from uninstalling MerlinAU
The idea is not to call the yes/no prompt helper during noninteractive startup since its default success result could be taken as confirmation and unintentionally trigger a full MerlinAU uninstall.
Add abort to firmware flash when USB eject fails
Don't wipe out the F/W directory when requesting changelogs
If requesting a changelog while the script was attempting to flash, it could wipe out the working directory.
Recognize MerlinAU processes launched through an explicit shell, such
as the firmware update cron job using "sh MerlinAU.sh run_now".
Restore original TrendMicro NVRAM values before any cleanup or flash
path can commit the temporary low-memory settings.

Bound Entware start and stop operations to 120 seconds and terminate a
stalled rc.unslung process tree after a short grace period instead of
allowing MerlinAU to hang indefinitely.

Track the Entware stop state before invoking rc.unslung so rollback can
still restore services if the Entware shutdown stalls.
Bumps the all-actions group with 1 update: [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `softprops/action-gh-release` from 3.0.3 to 3.0.4
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@v3.0.3...v3.0.4)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
…/dev/all-actions-6d69e638c7

Bump softprops/action-gh-release from 3.0.3 to 3.0.4 in the all-actions group
@ExtremeFiretop
ExtremeFiretop merged commit 06f68b7 into main Nov 24, 2026
8 checks 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.

1 participant