From 80bd368cecc3792d386cfb3992deab0a98798fc3 Mon Sep 17 00:00:00 2001 From: ExtremeFiretop Date: Fri, 6 Jun 2025 12:31:59 -0400 Subject: [PATCH 1/6] Exclude AP's from AiMesh Detection Exclude AP's from AiMesh Detection --- MerlinAU.sh | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/MerlinAU.sh b/MerlinAU.sh index b08b0c6c..3e0759f9 100644 --- a/MerlinAU.sh +++ b/MerlinAU.sh @@ -4,12 +4,12 @@ # # Original Creation Date: 2023-Oct-01 by @ExtremeFiretop. # Official Co-Author: @Martinski W. - Date: 2023-Nov-01 -# Last Modified: 2025-Jun-02 +# Last Modified: 2025-Jun-06 ################################################################### set -u ## Set version for each Production Release ## -readonly SCRIPT_VERSION=1.4.7 +readonly SCRIPT_VERSION=1.4.8 readonly SCRIPT_NAME="MerlinAU" ## Set to "master" for Production Releases ## SCRIPT_BRANCH="master" @@ -4638,33 +4638,38 @@ _GetLoginCredentials_() return 0 } -##----------------------------------------## -## Modified by Martinski W. [2024-Apr-06] ## -##----------------------------------------## +##-------------------------------------------## +## Modified by ExtremeFiretop [2025-June-06] ## +##-------------------------------------------## _GetNodeIPv4List_() { - # Get the value of asus_device_list # - local ip_addresses - local device_list="$(nvram get asus_device_list)" + local NODE_ROLE="2" # keep only nodes whose last field == 2 + local device_list ip_addresses - # Check if asus_device_list is not empty # - if [ -n "$device_list" ] - then - # Split the device list into records and extract the IP addresses, excluding Main Router LAN IP address # - ip_addresses="$(echo "$device_list" | tr '<' '\n' | awk -v exclude="$mainLAN_IPaddr" -F'>' '{if (NF>=4 && $3 != exclude) print $3}')" + device_list="$(nvram get asus_device_list)" - # Check if IP addresses are not empty # - if [ -n "$ip_addresses" ]; then - # Print each IP address on a separate line - printf "%s\n" "$ip_addresses" - else - return 1 - fi - else + if [ -z "$device_list" ]; then Say "NVRAM asus_device_list is NOT populated. No Mesh Nodes were found." return 1 fi - return 0 + + ip_addresses="$( + printf '%s\n' "$device_list" | + tr '<' '\n' | + awk -F'>' \ + -v role="$NODE_ROLE" \ + -v exclude="$mainLAN_IPaddr" ' + NF >= 4 && $3 != exclude && $NF == role { print $3 } + ' + )" + + if [ -n "$ip_addresses" ]; then + printf '%s\n' "$ip_addresses" + return 0 + fi + + # nothing matched + return 1 } ##----------------------------------------## From 311be1ef1167d55959423d111fd56c5580bd8b4b Mon Sep 17 00:00:00 2001 From: Joel Samson Date: Fri, 6 Jun 2025 12:50:34 -0400 Subject: [PATCH 2/6] Update version.txt --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index be05bba9..b2e46d18 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.4.7 +1.4.8 From 56f94f91789a5e40e8a3446d5cb63f72549038fc Mon Sep 17 00:00:00 2001 From: Joel Samson Date: Fri, 6 Jun 2025 12:50:51 -0400 Subject: [PATCH 3/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a98de726..74e92e2b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MerlinAU - AsusWRT-Merlin Firmware Auto Updater -## v1.4.7 -## 2025-Jun-03 +## v1.4.8 +## 2025-Jun-06 ## WebUI: ![image](https://github.com/user-attachments/assets/9c1dff99-9c13-491b-a7fa-aff924d5f02e) From d7cf325d5d5579ca4832b7f4ad444291f5a3e258 Mon Sep 17 00:00:00 2001 From: Joel Samson Date: Fri, 6 Jun 2025 12:52:28 -0400 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74e92e2b..5dd0417f 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ Use your preferred SSH client to connect to the router. *Manual Installation* 1. To Download the script to your router, Copy and paste: ```bash -curl --retry 3 "https://raw.githubusercontent.com/ExtremeFiretop/MerlinAutoUpdate-Router/master/MerlinAU.sh" -o "/jffs/scripts/MerlinAU.sh" && chmod +x "/jffs/scripts/MerlinAU.sh && sh /jffs/scripts/MerlinAU.sh install" +curl --retry 3 "https://raw.githubusercontent.com/ExtremeFiretop/MerlinAutoUpdate-Router/master/MerlinAU.sh" -o "/jffs/scripts/MerlinAU.sh" && chmod +x "/jffs/scripts/MerlinAU.sh" && sh /jffs/scripts/MerlinAU.sh install ``` - The script is now ready for use! From af48c475b423ae84c1a7a84a8b5a6310edb7d4b6 Mon Sep 17 00:00:00 2001 From: ExtremeFiretop Date: Sun, 8 Jun 2025 08:33:14 -0400 Subject: [PATCH 5/6] Removing Node Login Failure from Password Status Removing Node Login Failure from Password Status Will keep the messaging, but will stop it from resetting the password as "invalid" If I have 5 nodes and one goes offline unexpectly without being unpaired first, that does not make the password invalid, but we can keep the message that the login failed for the node. --- MerlinAU.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/MerlinAU.sh b/MerlinAU.sh index 3e0759f9..eccfe088 100644 --- a/MerlinAU.sh +++ b/MerlinAU.sh @@ -4,7 +4,7 @@ # # Original Creation Date: 2023-Oct-01 by @ExtremeFiretop. # Official Co-Author: @Martinski W. - Date: 2023-Nov-01 -# Last Modified: 2025-Jun-06 +# Last Modified: 2025-Jun-08 ################################################################### set -u @@ -4742,9 +4742,9 @@ _GetNodeURL_() echo "${urlProto}://${NodeIP_Address}${urlPort}" } -##----------------------------------------## -## Modified by Martinski W. [2025-Mar-07] ## -##----------------------------------------## +##------------------------------------------## +## Modified by ExtremeFiretop [2025-June-08] ## +##------------------------------------------## _GetNodeInfo_() { local NodeIP_Address="$1" @@ -4792,11 +4792,9 @@ _GetNodeInfo_() if [ $? -ne 0 ] then - _UpdateLoginPswdCheckHelper_ FAILURE printf "\n${REDct}Login failed for AiMesh Node [$NodeIP_Address].${NOct}\n" return 1 fi - _UpdateLoginPswdCheckHelper_ SUCCESS # Retrieve the HTML content # htmlContent="$(curl -s -k "${NodeURLstr}/appGet.cgi?hook=nvram_get(productid)%3bnvram_get(asus_device_list)%3bnvram_get(cfg_device_list)%3bnvram_get(firmver)%3bnvram_get(buildno)%3bnvram_get(extendno)%3bnvram_get(webs_state_flag)%3bnvram_get(odmpid)%3bnvram_get(wps_modelnum)%3bnvram_get(model)%3bnvram_get(build_name)%3bnvram_get(lan_hostname)%3bnvram_get(webs_state_info)%3bnvram_get(label_mac)" \ From 787f693edcca5806d2c8f9925498d013005710c6 Mon Sep 17 00:00:00 2001 From: Joel Samson Date: Sun, 8 Jun 2025 08:44:12 -0400 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5dd0417f..641db1bc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MerlinAU - AsusWRT-Merlin Firmware Auto Updater ## v1.4.8 -## 2025-Jun-06 +## 2025-Jun-08 ## WebUI: ![image](https://github.com/user-attachments/assets/9c1dff99-9c13-491b-a7fa-aff924d5f02e)