Skip to content

Commit 305a177

Browse files
Merge pull request #487 from ExtremeFiretop/dev
Dev 1.4.8 As Next Stable Release
2 parents cb3277c + 787f693 commit 305a177

3 files changed

Lines changed: 34 additions & 31 deletions

File tree

MerlinAU.sh

Lines changed: 30 additions & 27 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-08
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
##----------------------------------------##
@@ -4737,9 +4742,9 @@ _GetNodeURL_()
47374742
echo "${urlProto}://${NodeIP_Address}${urlPort}"
47384743
}
47394744

4740-
##----------------------------------------##
4741-
## Modified by Martinski W. [2025-Mar-07] ##
4742-
##----------------------------------------##
4745+
##------------------------------------------##
4746+
## Modified by ExtremeFiretop [2025-June-08] ##
4747+
##------------------------------------------##
47434748
_GetNodeInfo_()
47444749
{
47454750
local NodeIP_Address="$1"
@@ -4787,11 +4792,9 @@ _GetNodeInfo_()
47874792

47884793
if [ $? -ne 0 ]
47894794
then
4790-
_UpdateLoginPswdCheckHelper_ FAILURE
47914795
printf "\n${REDct}Login failed for AiMesh Node [$NodeIP_Address].${NOct}\n"
47924796
return 1
47934797
fi
4794-
_UpdateLoginPswdCheckHelper_ SUCCESS
47954798

47964799
# Retrieve the HTML content #
47974800
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)" \

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-08
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)