Skip to content

Commit efd2c3c

Browse files
Merge pull request #486 from ExtremeFiretop/Improved-AiMesh-Detection
Suggestion 3: Improved AiMesh Detection
2 parents f499920 + d7cf325 commit efd2c3c

File tree

3 files changed

+31
-26
lines changed

3 files changed

+31
-26
lines changed

MerlinAU.sh

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
#
55
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
66
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
7-
# Last Modified: 2025-Jun-02
7+
# Last Modified: 2025-Jun-06
88
###################################################################
99
set -u
1010

1111
## Set version for each Production Release ##
12-
readonly SCRIPT_VERSION=1.4.7
12+
readonly SCRIPT_VERSION=1.4.8
1313
readonly SCRIPT_NAME="MerlinAU"
1414
## Set to "master" for Production Releases ##
1515
SCRIPT_BRANCH="master"
@@ -4638,33 +4638,38 @@ _GetLoginCredentials_()
46384638
return 0
46394639
}
46404640

4641-
##----------------------------------------##
4642-
## Modified by Martinski W. [2024-Apr-06] ##
4643-
##----------------------------------------##
4641+
##-------------------------------------------##
4642+
## Modified by ExtremeFiretop [2025-June-06] ##
4643+
##-------------------------------------------##
46444644
_GetNodeIPv4List_()
46454645
{
4646-
# Get the value of asus_device_list #
4647-
local ip_addresses
4648-
local device_list="$(nvram get asus_device_list)"
4646+
local NODE_ROLE="2" # keep only nodes whose last field == 2
4647+
local device_list ip_addresses
46494648

4650-
# Check if asus_device_list is not empty #
4651-
if [ -n "$device_list" ]
4652-
then
4653-
# Split the device list into records and extract the IP addresses, excluding Main Router LAN IP address #
4654-
ip_addresses="$(echo "$device_list" | tr '<' '\n' | awk -v exclude="$mainLAN_IPaddr" -F'>' '{if (NF>=4 && $3 != exclude) print $3}')"
4649+
device_list="$(nvram get asus_device_list)"
46554650

4656-
# Check if IP addresses are not empty #
4657-
if [ -n "$ip_addresses" ]; then
4658-
# Print each IP address on a separate line
4659-
printf "%s\n" "$ip_addresses"
4660-
else
4661-
return 1
4662-
fi
4663-
else
4651+
if [ -z "$device_list" ]; then
46644652
Say "NVRAM asus_device_list is NOT populated. No Mesh Nodes were found."
46654653
return 1
46664654
fi
4667-
return 0
4655+
4656+
ip_addresses="$(
4657+
printf '%s\n' "$device_list" |
4658+
tr '<' '\n' |
4659+
awk -F'>' \
4660+
-v role="$NODE_ROLE" \
4661+
-v exclude="$mainLAN_IPaddr" '
4662+
NF >= 4 && $3 != exclude && $NF == role { print $3 }
4663+
'
4664+
)"
4665+
4666+
if [ -n "$ip_addresses" ]; then
4667+
printf '%s\n' "$ip_addresses"
4668+
return 0
4669+
fi
4670+
4671+
# nothing matched
4672+
return 1
46684673
}
46694674

46704675
##----------------------------------------##

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MerlinAU - AsusWRT-Merlin Firmware Auto Updater
2-
## v1.4.7
3-
## 2025-Jun-03
2+
## v1.4.8
3+
## 2025-Jun-06
44

55
## WebUI:
66
![image](https://github.com/user-attachments/assets/9c1dff99-9c13-491b-a7fa-aff924d5f02e)
@@ -136,7 +136,7 @@ Use your preferred SSH client to connect to the router.
136136
*Manual Installation*
137137
1. To Download the script to your router, Copy and paste:
138138
```bash
139-
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"
139+
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
140140
```
141141
- The script is now ready for use!
142142

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.7
1+
1.4.8

0 commit comments

Comments
 (0)