Skip to content

Commit ca5020e

Browse files
Wording Changes
Just some wording changes in the UI messages to make the intended meaning much clearer.
1 parent 1366b77 commit ca5020e

File tree

3 files changed

+60
-61
lines changed

3 files changed

+60
-61
lines changed

MerlinAU.asp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<script language="JavaScript" type="text/javascript">
2828
2929
/**----------------------------**/
30-
/** Last Modified: 2025-Oct-27 **/
30+
/** Last Modified: 2026-Jan-24 **/
3131
/**----------------------------**/
3232
3333
// Separate variables for shared and AJAX settings //
@@ -69,7 +69,7 @@ var scriptAutoUpdateCronSchedHR = 'TBD';
6969
var fwAutoUpdateCheckCronSchedHR = 'TBD';
7070
var isScriptUpdateAvailable = 'TBD';
7171
var fwUpdateEstimatedRunDate = 'TBD';
72-
var MinimumScriptFWRequired = 'TBD';
72+
var minimumScriptFWRequired = 'TBD';
7373
7474
let pendingScriptUpdateGateCheck = false;
7575
let scriptUpdateGateTries = 0;
@@ -261,7 +261,7 @@ function ExtractFWVersion(verStr)
261261
return match ? match[0] : String(verStr).trim();
262262
}
263263
264-
// Prefer hidden #firmver (same nvram source, no formatting risk), else fallback to #fwVersionInstalled
264+
// Prefer hidden #firmver (same nvram source, no formatting risk), else fallback to #fwVersionInstalled //
265265
function GetInstalledFWVersionFromUI()
266266
{
267267
let firmverInput = document.getElementById('firmver');
@@ -288,10 +288,10 @@ function RunScriptUpdateFirmwareGateCheck()
288288
289289
success: function()
290290
{
291-
let requiredStr = ExtractFWVersion(MinimumScriptFWRequired);
291+
let requiredStr = ExtractFWVersion(minimumScriptFWRequired);
292292
let installedStr = GetInstalledFWVersionFromUI();
293293
294-
// If required version isn't ready yet, retry a few times
294+
// If required version isn't ready yet, retry a few times //
295295
if (!requiredStr || requiredStr === 'TBD')
296296
{
297297
if (scriptUpdateGateTries < scriptUpdateGateMaxTries)
@@ -313,11 +313,11 @@ function RunScriptUpdateFirmwareGateCheck()
313313
{
314314
alert(
315315
"**SCRIPT UPDATE BLOCKED**\n\n" +
316-
"MerlinAU cannot update because your installed firmware is " +
317-
"below the minimum required firmware for this script update.\n\n" +
318-
"Installed firmware: " + installedStr + "\n" +
319-
"Minimum required: " + requiredStr + "\n\n" +
320-
"Please update your router firmware, then try again."
316+
"MerlinAU script cannot be updated because your router firmware is " +
317+
"below the minimum firmware version supported by the new script update.\n\n" +
318+
"Installed firmware version: " + installedStr + "\n" +
319+
"Minimum version supported: " + requiredStr + "\n\n" +
320+
"Please update the router firmware first, then try again to update the script."
321321
);
322322
}
323323
},
@@ -2223,14 +2223,12 @@ function initial()
22232223
hiddenFrame.onload = function()
22242224
{
22252225
console.log("Hidden frame loaded with server response.");
2226-
22272226
if (pendingScriptUpdateGateCheck)
22282227
{
2229-
// Wait a moment to allow the backend logic to finish writing checkHelper.js
2228+
// Wait a moment to allow the backend logic to finish writing checkHelper.js //
22302229
setTimeout(RunScriptUpdateFirmwareGateCheck, 1000);
22312230
}
22322231
};
2233-
22342232
initializeCollapsibleSections();
22352233
}
22362234
}

MerlinAU.sh

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
#
55
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
66
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
7-
# Last Modified: 2026-Jan-02
7+
# Last Modified: 2026-Jan-24
88
###################################################################
99
set -u
1010

1111
## Set version for each Production Release ##
1212
readonly SCRIPT_VERSION=1.5.9
13-
readonly SCRIPT_VERSTAG="26012310"
13+
readonly SCRIPT_VERSTAG="26012404"
1414
readonly SCRIPT_NAME="MerlinAU"
1515
## Set to "master" for Production Releases ##
1616
SCRIPT_BRANCH="dev"
@@ -198,12 +198,13 @@ readonly fwInstalledInnerVers="$(nvram get innerver)"
198198
readonly fwInstalledBranchVer="${fwInstalledBaseVers}.$(echo "$fwInstalledBuildVers" | awk -F'.' '{print $1}')"
199199

200200
##------------------------------------------##
201-
## Modified by ExtremeFiretop [2025-Jan-23] ##
201+
## Modified by ExtremeFiretop [2026-Jan-23] ##
202202
##------------------------------------------##
203-
# For minimum supported firmware version check #
204-
# TO NOTE: Due to Gnuton being behind RMerlin #
205-
# Only lock out firmware versions that are 5 #
206-
# builds behind the current production #
203+
# For minimum supported firmware version check.
204+
# *NOTE*: Due to Gnuton F/W being behind RMerlin
205+
# F/W releases, remove support for F/W versions
206+
# that are 5 builds behind the latest production.
207+
#------------------------------------------------#
207208
MinFirmwareVerCheckFailed=false
208209
NewMinSupportedFirmwareVers="TBD"
209210
readonly MinSupportedFW_3004_386_Ver="3004.386.13.2"
@@ -2810,13 +2811,13 @@ _DownloadScriptFiles_()
28102811
}
28112812

28122813
##---------------------------------------##
2813-
## Added by ExtremeFiretop [2025-Jan-23] ##
2814+
## Added by ExtremeFiretop [2026-Jan-23] ##
28142815
##---------------------------------------##
28152816
_GetRemoteMinSupportedFirmwareVers_()
28162817
{
2817-
# Echoes the minimum supported FW version (string) for the
2818-
# currently-installed FW branch (e.g. 3004.388), based on the
2819-
# *REMOTE* script content. Returns 0 on success.
2818+
# Returns the minimum supported F/W version string for the #
2819+
# currently-installed F/W branch (e.g. 3004.388), based on #
2820+
# the *REMOTE* script content. Returns code 0 on success. #
28202821
local tmpScript srceScriptUrl current_version branchVer branchKey
28212822
local varName minVers defaultVar
28222823

@@ -2860,24 +2861,25 @@ _GetRemoteMinSupportedFirmwareVers_()
28602861
}
28612862

28622863
##---------------------------------------##
2863-
## Added by ExtremeFiretop [2025-Jan-23] ##
2864+
## Added by ExtremeFiretop [2026-Jan-23] ##
28642865
##---------------------------------------##
28652866
_CheckNewScriptMinFWBeforeUpdate_()
28662867
{
2867-
# Returns 0 if OK (or unknown), 1 if the NEW script requires newer FW.
2868-
# Sets global NewMinSupportedFirmwareVers when known.
2868+
# Returns 0 if OK (or unknown), 1 if the NEW script requires newer FW. #
2869+
# Sets global NewMinSupportedFirmwareVers when known. #
28692870
local current_version numOfFields numCurrentVers numNewMinVers
28702871
local newMinVers
28712872

2872-
# If already known, reuse it (do not re-download / re-parse remote script)
2873-
if [ -n "$NewMinSupportedFirmwareVers" ] && [ "$NewMinSupportedFirmwareVers" != "TBD" ]
2873+
# If already known, reuse it (do not re-download / re-parse remote script) #
2874+
if [ -n "$NewMinSupportedFirmwareVers" ] && \
2875+
[ "$NewMinSupportedFirmwareVers" != "TBD" ]
28742876
then
28752877
newMinVers="$NewMinSupportedFirmwareVers"
28762878
else
28772879
newMinVers="$(_GetRemoteMinSupportedFirmwareVers_)" || return 0
28782880
[ -n "$newMinVers" ] || return 0
28792881

2880-
# Cache for future calls
2882+
# Cache for future calls #
28812883
NewMinSupportedFirmwareVers="$newMinVers"
28822884
fi
28832885

@@ -2892,10 +2894,12 @@ _CheckNewScriptMinFWBeforeUpdate_()
28922894
}
28932895

28942896
##-------------------------------------------##
2895-
## Modified by ExtremeFiretop [2025-Jan-23] ##
2897+
## Modified by ExtremeFiretop [2026-Jan-23] ##
28962898
##-------------------------------------------##
28972899
_SCRIPT_UPDATE_()
28982900
{
2901+
local current_version
2902+
28992903
ScriptUpdateDeclined=false
29002904
if [ $# -gt 0 ] && [ "$1" = "force" ]
29012905
then
@@ -2906,25 +2910,23 @@ _SCRIPT_UPDATE_()
29062910
current_version="$(_GetCurrentFWInstalledLongVersion_)"
29072911
if ! _CheckNewScriptMinFWBeforeUpdate_
29082912
then
2909-
_WriteVarDefToHelperJSFile_ "MinimumScriptFWRequired" "$NewMinSupportedFirmwareVers"
2913+
_WriteVarDefToHelperJSFile_ "minimumScriptFWRequired" "$NewMinSupportedFirmwareVers"
29102914
printf "\n${CRITct}*WARNING*:${NOct} MerlinAU v${DLRepoVersion} "
2911-
printf "requires newer router firmware.\n"
2912-
printf "\nCurrent F/W version found: ${REDct}%s${NOct}" \
2913-
"$current_version"
2914-
printf "\nMinimum version required: ${GRNct}%s${NOct}\n" \
2915-
"$NewMinSupportedFirmwareVers"
2916-
printf "\n${BOLDct}Recommendation:${NOct} Update router firmware first.\n"
2915+
printf "requires a newer router firmware version.\n"
2916+
printf "\nCurrent F/W version found: ${REDct}%s${NOct}" "$current_version"
2917+
printf "\nMinimum version supported: ${GRNct}%s${NOct}\n" "$NewMinSupportedFirmwareVers"
2918+
printf "\n${BOLDct}RECOMMENDATION:${NOct}\nUpdate the router firmware first before updating the MerlinAU script.\n"
29172919
if "$isInteractive"
29182920
then
2919-
printf "\n${BOLDct}Continue downloading anyway?${NOct}"
2921+
printf "\n${BOLDct}Continue to download and update the script anyway?${NOct}"
29202922
if ! _WaitForYESorNO_
29212923
then
29222924
ScriptUpdateDeclined=true
29232925
printf "\n${GRNct}Update cancelled.${NOct}\n"
29242926
return 1
29252927
fi
29262928
else
2927-
# Non-interactive (auto-update): do NOT brick the script.
2929+
# Non-interactive (auto-update): do NOT brick the script #
29282930
_SendEMailNotification_ FAILED_SCRIPT_UPDATE_MIN_FW_STATUS
29292931
return 1
29302932
fi
@@ -2971,19 +2973,18 @@ _SCRIPT_UPDATE_()
29712973
printf "${CYANct}Update Version Available Now: ${YLWct}${DLRepoVersion}${NOct}\n\n"
29722974

29732975
if "$mountWebGUI_OK"
2974-
then _SetVersionSharedSettings_ server "$DLRepoVersion" ; fi
2976+
then _SetVersionSharedSettings_ server "$DLRepoVersion"
2977+
fi
29752978

29762979
current_version="$(_GetCurrentFWInstalledLongVersion_)"
29772980
if ! _CheckNewScriptMinFWBeforeUpdate_
29782981
then
2979-
_WriteVarDefToHelperJSFile_ "MinimumScriptFWRequired" "$NewMinSupportedFirmwareVers"
2980-
printf "\n${CRITct}*WARNING*:${NOct} Updating to MerlinAU v${DLRepoVersion} "
2981-
printf "requires newer router firmware.\n"
2982-
printf "\nCurrent F/W version found: ${REDct}%s${NOct}" \
2983-
"$current_version"
2984-
printf "\nMinimum version required: ${GRNct}%s${NOct}\n" \
2985-
"$NewMinSupportedFirmwareVers"
2986-
printf "\n${BOLDct}Recommendation:${NOct} Update router firmware first.\n"
2982+
_WriteVarDefToHelperJSFile_ "minimumScriptFWRequired" "$NewMinSupportedFirmwareVers"
2983+
printf "\n${CRITct}*WARNING*:${NOct} MerlinAU v${DLRepoVersion} "
2984+
printf "requires a newer router firmware version.\n"
2985+
printf "\nCurrent F/W version found: ${REDct}%s${NOct}" "$current_version"
2986+
printf "\nMinimum version supported: ${GRNct}%s${NOct}\n" "$NewMinSupportedFirmwareVers"
2987+
printf "\n${BOLDct}RECOMMENDATION:${NOct}\nUpdate the router firmware first before updating the MerlinAU script.\n\n"
29872988
fi
29882989

29892990
if [ "$SCRIPT_VERSION" = "$DLRepoVersion" ] && \
@@ -3097,9 +3098,9 @@ _CheckForNewScriptUpdates_()
30973098
then
30983099
if ! _CheckNewScriptMinFWBeforeUpdate_
30993100
then
3100-
_WriteVarDefToHelperJSFile_ "MinimumScriptFWRequired" "$NewMinSupportedFirmwareVers"
3101+
_WriteVarDefToHelperJSFile_ "minimumScriptFWRequired" "$NewMinSupportedFirmwareVers"
31013102
else
3102-
_WriteVarDefToHelperJSFile_ "MinimumScriptFWRequired" "TBD"
3103+
_WriteVarDefToHelperJSFile_ "minimumScriptFWRequired" "TBD"
31033104
fi
31043105
scriptUpdateNotify="New script update available.
31053106
${REDct}v${SCRIPT_VERSION}${NOct} --> ${GRNct}v${DLRepoVersion}${NOct}"
@@ -3114,7 +3115,7 @@ ${REDct}v${SCRIPT_VERSION}${NOct} --> ${GRNct}v${DLRepoVersion}${NOct}"
31143115
fi
31153116
else
31163117
scriptUpdateNotify=0
3117-
_WriteVarDefToHelperJSFile_ "MinimumScriptFWRequired" "TBD"
3118+
_WriteVarDefToHelperJSFile_ "minimumScriptFWRequired" "TBD"
31183119
_WriteVarDefToHelperJSFile_ "isScriptUpdateAvailable" "TBD"
31193120
fi
31203121
return 0
@@ -3142,7 +3143,7 @@ _GetLatestFWUpdateVersionFromRouter_()
31423143
}
31433144

31443145
##------------------------------------------##
3145-
## Modified by ExtremeFiretop [2025-Jan-23] ##
3146+
## Modified by ExtremeFiretop [2026-Jan-23] ##
31463147
##------------------------------------------##
31473148
_CreateEMailContent_()
31483149
{
@@ -3243,8 +3244,8 @@ _CreateEMailContent_()
32433244
} > "$tempEMailBodyMsg"
32443245
;;
32453246
FAILED_SCRIPT_UPDATE_MIN_FW_STATUS)
3246-
# best-effort: use already-known minimum requirement if available,
3247-
# otherwise attempt to compute it again from remote script
3247+
# Use already-known minimum version requirement if available; #
3248+
# otherwise, attempt to compute it again from remote script #
32483249
minFwRequired="$NewMinSupportedFirmwareVers"
32493250
if [ -z "$minFwRequired" ]
32503251
then
@@ -3255,11 +3256,11 @@ _CreateEMailContent_()
32553256
emailBodyTitle="MerlinAU Script Update Blocked (Unsupported Firmware)"
32563257
{
32573258
echo "MerlinAU did NOT install the new Script Update version <b>${DLRepoVersion}</b> on your <b>${MODEL_ID}</b> router."
3258-
echo "Reason: Your router firmware is below the minimum supported firmware required by this MerlinAU update."
3259-
printf "\nCurrent router firmware version:\n<b>${fwInstalledVersion}</b>\n"
3260-
printf "\nMinimum firmware required for MerlinAU v${DLRepoVersion}:\n<b>${minFwRequired}</b>\n"
3259+
echo "Reason: Your router firmware is below the minimum firmware version supported by the new MerlinAU update."
3260+
printf "\nCurrent router firmware version installed:\n<b>${fwInstalledVersion}</b>\n"
3261+
printf "\nMinimum firmware version supported by MerlinAU v${DLRepoVersion}:\n<b>${minFwRequired}</b>\n"
32613262
printf "\nThe installed script version remains: <b>${SCRIPT_VERSION}</b>\n"
3262-
printf "\nRecommendation: Update your router firmware first, then retry the MerlinAU update.\n"
3263+
printf "\nRECOMMENDATION:\nUpdate the router firmware first, then try again to update the MerlinAU script.\n"
32633264
} > "$tempEMailBodyMsg"
32643265
;;
32653266
FAILED_SCRIPT_UPDATE_STATUS)
@@ -10018,7 +10019,7 @@ _CheckForMinimumRequirements_()
1001810019
requirementsCheckOK=false
1001910020
Say "\n${CRITct}*WARNING*:${NOct} The current firmware version is below the minimum supported by this script."
1002010021
printf "\nCurrent F/W version found: ${REDct}${FW_InstalledVersion}${NOct}"
10021-
printf "\nMinimum version required: ${GRNct}${MinSupportedFirmwareVers}${NOct}\n"
10022+
printf "\nMinimum version supported: ${GRNct}${MinSupportedFirmwareVers}${NOct}\n"
1002210023
fi
1002310024

1002410025
jffsScriptOK="$(nvram get jffs2_scripts)"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# MerlinAU - AsusWRT-Merlin Firmware Auto Updater
22

33
## v1.5.9
4-
## 2026-Jan-23
4+
## 2026-Jan-24
55

66
## WebUI:
77
![image](https://github.com/user-attachments/assets/9c1dff99-9c13-491b-a7fa-aff924d5f02e)

0 commit comments

Comments
 (0)