Skip to content

ROG Failure Email Patch#145

Merged
Martinski4GitHub merged 1 commit intodevfrom
ExtremeFiretop-ROG_EMAIL
Feb 28, 2024
Merged

ROG Failure Email Patch#145
Martinski4GitHub merged 1 commit intodevfrom
ExtremeFiretop-ROG_EMAIL

Conversation

@ExtremeFiretop
Copy link
Owner

@ExtremeFiretop ExtremeFiretop commented Feb 27, 2024

Currently with ROG routers using ROG builds of the firmware, post reboot the email notifications function believes that the firmware update failed when in fact it did not.

User will receive a "failed update" email even though the router updated successfully on rog routers using rog UIs.
Seems I had an issue with the post-reboot hook since the update happened successfully and it waited 3 minutes to send me the notification. Something was evaluated wrong in the post reboot.

Post reboot file variables:
savedInstalledVersion = 3004.388.6.0_rog
savedNewUpdateVersion = 3004.388.6.2

$fwInstalledVersion:
Pre-Update = 3004.388.6.0_rog
Post-Update = 3004.388.6.2_rog

There's a potential issue in comparing version strings with and without suffixes (like _rog)?
If the script strictly compares these strings, 3004.388.6.2 would not be considered equal to 3004.388.6.2_rog, and thus, the post-update scenario might not be recognized as successful.

ROG Failure Email Patch
@Martinski4GitHub
Copy link
Collaborator

Martinski4GitHub commented Feb 28, 2024

Post reboot file variables:
savedInstalledVersion = 3004.388.6.0_rog
savedNewUpdateVersion = 3004.388.6.2

$fwInstalledVersion:
Pre-Update = 3004.388.6.0_rog
Post-Update = 3004.388.6.2_rog

There's a potential issue in comparing version strings with and without suffixes (like _rog)? If the script strictly compares these strings, 3004.388.6.2 would not be considered equal to 3004.388.6.2_rog, and thus, the post-update scenario might not be recognized as successful.

Great catch!!

@Martinski4GitHub Martinski4GitHub merged commit 722013d into dev Feb 28, 2024
@ExtremeFiretop ExtremeFiretop deleted the ExtremeFiretop-ROG_EMAIL branch February 28, 2024 05:09
@ExtremeFiretop
Copy link
Owner Author

Post reboot file variables:
savedInstalledVersion = 3004.388.6.0_rog
savedNewUpdateVersion = 3004.388.6.2
$fwInstalledVersion:
Pre-Update = 3004.388.6.0_rog
Post-Update = 3004.388.6.2_rog
There's a potential issue in comparing version strings with and without suffixes (like _rog)? If the script strictly compares these strings, 3004.388.6.2 would not be considered equal to 3004.388.6.2_rog, and thus, the post-update scenario might not be recognized as successful.

Great catch!!

Thank you! I noticed this behavior while testing this in dev, but at the time, I figured it was because I was just going 388.6 to 388.6 and that the comparison would always think it failed because the version numbers didn't change.

But today, the version numbers did change, And I still got the failure email, so it sent me down the hunt to find where the little sneaky bug might be hiding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants