@@ -189,7 +189,6 @@ readonly fwInstalledExtendNum="$(nvram get extendno)"
189189readonly fwInstalledInnerVers=" $( nvram get innerver) "
190190readonly fwInstalledBranchVer=" ${fwInstalledBaseVers} .$( echo " $fwInstalledBuildVers " | awk -F' .' ' {print $1}' ) "
191191
192-
193192# #------------------------------------------##
194193# # Modified by ExtremeFiretop [2025-Apr-09] ##
195194# #------------------------------------------##
@@ -199,10 +198,14 @@ readonly MinSupportedFW_3004_386_Ver="3004.386.13.2"
199198readonly MinSupportedFW_3004_388_Ver=" 3004.388.8.0"
200199readonly MinSupportedFW_3006_102_Ver=" 3004.388.8.2"
201200
201+ # #----------------------------------------##
202+ # # Modified by Martinski W. [2025-Apr-09] ##
203+ # #----------------------------------------##
202204case " $fwInstalledBranchVer " in
203205 " 3004.386" ) MinSupportedFirmwareVers=" $MinSupportedFW_3004_386_Ver " ;;
204206 " 3004.388" ) MinSupportedFirmwareVers=" $MinSupportedFW_3004_388_Ver " ;;
205207 " 3006.102" ) MinSupportedFirmwareVers=" $MinSupportedFW_3006_102_Ver " ;;
208+ * ) MinSupportedFirmwareVers=" $MinSupportedFW_3004_386_Ver "
206209esac
207210
208211# #----------------------------------------##
@@ -1064,7 +1067,7 @@ _WriteVarDefToPswdCheckJSFile_()
10641067# #-------------------------------------##
10651068# # Added by Martinski W. [2025-Mar-07] ##
10661069# #-------------------------------------##
1067- _GetLoginPswdCheckStatusJS_ ()
1070+ _GetLoginPswdCheckStatusCodeJS_ ()
10681071{
10691072 if [ ! -s " $PSWD_CHECK_JS " ] ; then echo " 0" ; return 0 ; fi
10701073 local checkCode
@@ -1076,6 +1079,21 @@ _GetLoginPswdCheckStatusJS_()
10761079 return 0
10771080}
10781081
1082+ # #-------------------------------------##
1083+ # # Added by Martinski W. [2025-Apr-09] ##
1084+ # #-------------------------------------##
1085+ _GetLoginPswdCheckStatusMsgeJS_ ()
1086+ {
1087+ if [ ! -s " $PSWD_CHECK_JS " ] ; then echo " UNKNOWN" ; return 0 ; fi
1088+ local checkMsge
1089+ checkMsge=" $( grep " ^var loginPswdCheckMsgStr =" " $PSWD_CHECK_JS " | awk -F " [=']" ' {print $3}' ) "
1090+ if [ -z " $checkMsge " ]
1091+ then echo " UNKNOWN"
1092+ else echo " $checkMsge "
1093+ fi
1094+ return 0
1095+ }
1096+
10791097# #-------------------------------------##
10801098# # Added by Martinski W. [2025-Mar-07] ##
10811099# #-------------------------------------##
@@ -1094,7 +1112,7 @@ _UpdateLoginPswdCheckHelper_()
10941112 checkMsge=" Login access is RESTRICTED."
10951113 ;;
10961114 OldPSWD)
1097- prevChkCode=" $( _GetLoginPswdCheckStatusJS_ ) "
1115+ prevChkCode=" $( _GetLoginPswdCheckStatusCodeJS_ ) "
10981116 if [ -n " $prevChkCode " ] && [ " $prevChkCode " -gt 1 ]
10991117 then
11001118 return 0
@@ -1116,7 +1134,7 @@ _UpdateLoginPswdCheckHelper_()
11161134 checkMsge=" Password is INVALID."
11171135 ;;
11181136 UNKNOWN)
1119- prevChkCode=" $( _GetLoginPswdCheckStatusJS_ ) "
1137+ prevChkCode=" $( _GetLoginPswdCheckStatusCodeJS_ ) "
11201138 if [ -n " $prevChkCode " ] && [ " $prevChkCode " -gt 1 ]
11211139 then
11221140 return 0
@@ -1133,9 +1151,9 @@ _UpdateLoginPswdCheckHelper_()
11331151 _WriteVarDefToPswdCheckJSFile_ " loginPswdCheckMsgStr" " $checkMsge "
11341152}
11351153
1136- # #------------------------------------------ ##
1137- # # Modified by ExtremeFiretop [2025-Apr-09] ##
1138- # #------------------------------------------ ##
1154+ # #----------------------------------------##
1155+ # # Modified by Martinski W. [2025-Apr-09] ##
1156+ # #----------------------------------------##
11391157_InitCustomDefaultsConfig_ ()
11401158{
11411159 [ ! -d " $SETTINGS_DIR " ] && mkdir -m 755 -p " $SETTINGS_DIR "
@@ -1261,11 +1279,19 @@ _InitCustomDefaultsConfig_()
12611279 fi
12621280 retCode=1
12631281 fi
1264- if ! grep -q " ^credentials_base64 " " $CONFIG_FILE "
1282+ if ! grep -q " ^FW_New_Update_Changelog_Approval= " " $CONFIG_FILE "
12651283 then
12661284 if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 12 ]
1285+ then echo " FW_New_Update_Changelog_Approval=TBD" >> " $CONFIG_FILE "
1286+ else sed -i " 12 i FW_New_Update_Changelog_Approval=TBD" " $CONFIG_FILE "
1287+ fi
1288+ retCode=1
1289+ fi
1290+ if ! grep -q " ^credentials_base64 " " $CONFIG_FILE "
1291+ then
1292+ if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 13 ]
12671293 then echo " credentials_base64 TBD" >> " $CONFIG_FILE "
1268- else sed -i " 12 i credentials_base64 TBD" " $CONFIG_FILE "
1294+ else sed -i " 13 i credentials_base64 TBD" " $CONFIG_FILE "
12691295 fi
12701296 _UpdateLoginPswdCheckHelper_ InitPWD
12711297 retCode=1
@@ -1274,49 +1300,49 @@ _InitCustomDefaultsConfig_()
12741300 fi
12751301 if ! grep -q " ^CheckChangeLog " " $CONFIG_FILE "
12761302 then
1277- if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 13 ]
1303+ if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 14 ]
12781304 then echo " CheckChangeLog ENABLED" >> " $CONFIG_FILE "
1279- else sed -i " 13 i CheckChangeLog ENABLED" " $CONFIG_FILE "
1305+ else sed -i " 14 i CheckChangeLog ENABLED" " $CONFIG_FILE "
12801306 fi
12811307 retCode=1
12821308 fi
12831309 if ! grep -q " ^FW_Update_Check " " $CONFIG_FILE "
12841310 then
1285- if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 14 ]
1311+ if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 15 ]
12861312 then echo " FW_Update_Check TBD" >> " $CONFIG_FILE "
1287- else sed -i " 14 i FW_Update_Check TBD" " $CONFIG_FILE "
1313+ else sed -i " 15 i FW_Update_Check TBD" " $CONFIG_FILE "
12881314 fi
12891315 retCode=1
12901316 fi
12911317 if ! grep -q " ^Allow_Updates_OverVPN " " $CONFIG_FILE "
12921318 then
1293- if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 15 ]
1319+ if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 16 ]
12941320 then echo " Allow_Updates_OverVPN DISABLED" >> " $CONFIG_FILE "
1295- else sed -i " 15 i Allow_Updates_OverVPN DISABLED" " $CONFIG_FILE "
1321+ else sed -i " 16 i Allow_Updates_OverVPN DISABLED" " $CONFIG_FILE "
12961322 fi
12971323 retCode=1
12981324 fi
12991325 if ! grep -q " ^FW_Allow_Beta_Production_Up " " $CONFIG_FILE "
13001326 then
1301- if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 16 ]
1327+ if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 17 ]
13021328 then echo " FW_Allow_Beta_Production_Up ENABLED" >> " $CONFIG_FILE "
1303- else sed -i " 16 i FW_Allow_Beta_Production_Up ENABLED" " $CONFIG_FILE "
1329+ else sed -i " 17 i FW_Allow_Beta_Production_Up ENABLED" " $CONFIG_FILE "
13041330 fi
13051331 retCode=1
13061332 fi
13071333 if ! grep -q " ^Allow_Script_Auto_Update " " $CONFIG_FILE "
13081334 then
1309- if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 17 ]
1335+ if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 18 ]
13101336 then echo " Allow_Script_Auto_Update DISABLED" >> " $CONFIG_FILE "
1311- else sed -i " 17 i Allow_Script_Auto_Update DISABLED" " $CONFIG_FILE "
1337+ else sed -i " 18 i Allow_Script_Auto_Update DISABLED" " $CONFIG_FILE "
13121338 fi
13131339 retCode=1
13141340 fi
13151341 if ! grep -q " ^Script_Update_Cron_Job_SchedDays=" " $CONFIG_FILE "
13161342 then
1317- if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 18 ]
1343+ if [ " $( wc -l < " $CONFIG_FILE " ) " -lt 19 ]
13181344 then echo " Script_Update_Cron_Job_SchedDays=\" ${SW_Update_CRON_DefaultSchedDays} \" " >> " $CONFIG_FILE "
1319- else sed -i " 18 i Script_Update_Cron_Job_SchedDays=\" ${SW_Update_CRON_DefaultSchedDays} \" " " $CONFIG_FILE "
1345+ else sed -i " 19 i Script_Update_Cron_Job_SchedDays=\" ${SW_Update_CRON_DefaultSchedDays} \" " " $CONFIG_FILE "
13201346 fi
13211347 retCode=1
13221348 fi
@@ -2847,7 +2873,8 @@ _SCRIPT_UPDATE_()
28472873 if " $mountWebGUI_OK "
28482874 then _SetVersionSharedSettings_ server " $DLRepoVersion " ; fi
28492875
2850- if [ " $SCRIPT_VERSION " = " $DLRepoVersion " ] && { [ -z " $DLRepoBuildNum " ] || [ " $DLRepoBuildNum " = " $ScriptBuildNum " ]; }
2876+ if [ " $SCRIPT_VERSION " = " $DLRepoVersion " ] && \
2877+ { [ -z " $DLRepoBuildNum " ] || [ " $DLRepoBuildNum " = " $ScriptBuildNum " ]; }
28512878 then
28522879 echo -e " ${CYANct} You are on the latest version! Would you like to download anyway?${NOct} "
28532880 echo -e " ${CYANct} This will overwrite your currently installed version.${NOct} "
@@ -2861,8 +2888,8 @@ _SCRIPT_UPDATE_()
28612888 then _SetVersionSharedSettings_ local " $DLRepoVersion "
28622889 fi
28632890 printf " \n${CYANct} Download successful!${NOct} \n"
2864- printf " $( date) - Successfully downloaded $SCRIPT_NAME v${DLRepoVersion} \n"
2865- printf " ${CYANct} Update successful! Restarting script...${NOct} \n"
2891+ printf " $( date) - Successfully updated $SCRIPT_NAME v${DLRepoVersion} \n"
2892+ printf " ${CYANct} Restarting script...${NOct} \n"
28662893 sleep 1
28672894 _CheckForNewGUIVersionUpdate_ && extraParam=" install"
28682895 _ReleaseLock_
@@ -2890,8 +2917,8 @@ _SCRIPT_UPDATE_()
28902917 then _SetVersionSharedSettings_ local " $DLRepoVersion "
28912918 fi
28922919 printf " \n${CYANct} Download successful!${NOct} \n"
2893- printf " \n$( date) - Successfully downloaded $SCRIPT_NAME v${DLRepoVersion} \n"
2894- printf " ${CYANct} Update successful! Restarting script...${NOct} \n"
2920+ printf " \n$( date) - Successfully updated $SCRIPT_NAME v${DLRepoVersion} \n"
2921+ printf " ${CYANct} Restarting script...${NOct} \n"
28952922 sleep 1
28962923 _CheckForNewGUIVersionUpdate_ && extraParam=" install"
28972924 _ReleaseLock_
@@ -4347,9 +4374,9 @@ with the \"${GRNct}Web UI${NOct}\" access type on the \"Access restriction list\
43474374 return 1
43484375}
43494376
4350- # #------------------------------------------ ##
4351- # # Modified by ExtremeFiretop [2025-Apr-09] ##
4352- # #------------------------------------------ ##
4377+ # #----------------------------------------##
4378+ # # Modified by Martinski W. [2025-Apr-09] ##
4379+ # #----------------------------------------##
43534380_GetLoginCredentials_ ()
43544381{
43554382 local retry=" yes" userName savedMsgStr
@@ -4408,15 +4435,12 @@ _GetLoginCredentials_()
44084435 printf " Encoded Credentials:\n"
44094436 printf " ${GRNct} $loginCredsENC ${NOct} \n"
44104437
4411- # Prompt to test the credentials #
44124438 if _WaitForYESorNO_ " \nWould you like to test the current login credentials?"
44134439 then
44144440 _TestLoginCredentials_ " $loginCredsENC " || continue
4415- else
4416- _UpdateLoginPswdCheckHelper_ UNKNOWN
44174441 fi
44184442
4419- # Stop the loop if the test passes or if the user chooses not to test #
4443+ # Stop the loop if test passes or if user chooses not to test #
44204444 retry=" no"
44214445 done
44224446
@@ -10176,12 +10200,13 @@ _InvalidMenuSelection_()
1017610200 _WaitForEnterKey_
1017710201}
1017810202
10179- # #------------------------------------------ ##
10180- # # Modified by ExtremeFiretop [2025-Apr-09] ##
10181- # #------------------------------------------ ##
10203+ # #----------------------------------------##
10204+ # # Modified by Martinski W. [2025-Apr-09] ##
10205+ # #----------------------------------------##
1018210206_ShowMainMenuOptions_ ()
1018310207{
1018410208 local FW_NewUpdateVerStr FW_NewUpdateVersion
10209+ local loginPswdStatusMsg pswdChckCTag
1018510210
1018610211 # -----------------------------------------------------------#
1018710212 # Check if router reports a new F/W update is available.
@@ -10260,10 +10285,15 @@ _ShowMainMenuOptions_()
1026010285 fi
1026110286 printf " \n${SEPstr} "
1026210287
10263- loginStatusMsg=$( grep " ^var loginPswdCheckMsgStr =" " $PSWD_CHECK_JS " | awk -F" '" ' {print $2}' )
1026410288 printf " \n ${GRNct} 1${NOct} . Run F/W Update Check Now\n"
10289+
10290+ loginPswdStatusMsg=" $( _GetLoginPswdCheckStatusMsgeJS_) "
10291+ if [ " $( _GetLoginPswdCheckStatusCodeJS_) " -eq 4 ]
10292+ then pswdChckCTag=" $InvBGRNct " # #SUCCESS##
10293+ else pswdChckCTag=" $InvBMGNct "
10294+ fi
1026510295 printf " \n ${GRNct} 2${NOct} . Set Router Login Password"
10266- printf " \n${padStr} [Currently ${InvBMGNct} $loginStatusMsg ${NOct} ]\n"
10296+ printf " \n${padStr} [Currently ${pswdChckCTag} $loginPswdStatusMsg ${NOct} ]\n"
1026710297
1026810298 # Enable/Disable the ASUS Router's built-in "F/W Update Check" #
1026910299 FW_UpdateCheckState=" $( nvram get firmware_check_enable) "
0 commit comments