JGrana
Very Senior Member
YesI just looked at the code. And yeah it might be that mine is stuck there too. When it's stuck. Does CTRL+C work?
YesI just looked at the code. And yeah it might be that mine is stuck there too. When it's stuck. Does CTRL+C work?
nvram get model
nvram get productid
nvram get build_name
nvram get 3rd-party
nvram get buildno
nvram get lan_hostname
nvram get jffs2_scripts
ip -V | awk -F "-" '{print $2}'
nvram get misc_http_x
nvram get fw_enable_x
nvram get ipv6_fw_enable
nvram get led_disable
nvram get log_level
nvram get ddns_enable_x
nvram get ddns_hostname_x
nvram get vpn_serverx_start
I'll be here. I don't have notifications but I'll regularly refresh. Also I'm still waiting for another SIM, so the modem is not currently plugged in. But the dual WAN feature is still on. Does it still install the script just fine? . Worst case I can plug it in and set the ping to my modem WebGUI IP which should be reachableOk, no worries I have an idea of what is going on. Standby for guidance.
I just edited my last post.I'll be here. I don't have notifications but I'll regularly refresh. Also I'm still waiting for another SIM, so the modem is not currently plugged in. But the dual WAN feature is still on. Does it still install the script just fine? . Worst case I can plug it in and set the ping to my modem WebGUI IP which should be reachable
Edit : When i did install the script and it hangs. I tried plugging the modem as a secondary with a valid sim installed. Doesn't change anything. I can't use my sim to the modem again because I need to temporarily use my phone sim and put it in there
Sent !! Thank you!Ok, no worries I have an idea of what is going on.
EDIT:
I did discover that I'm currently require ddns_hostname_x in nvram to not be null but I intended to accept null if DDNS was disabled so that could be it. Also I found a bug in it grabbing OVPN Server Instances within this function which keep in mind this is new and part of this beta cycle so I appreciate you guys helping me get these worked out.
DM me the output of these commands please.
Code:nvram get model nvram get productid nvram get build_name nvram get 3rd-party nvram get buildno nvram get lan_hostname nvram get jffs2_scripts ip -V | awk -F "-" '{print $2}' nvram get misc_http_x nvram get fw_enable_x nvram get ipv6_fw_enable nvram get led_disable nvram get log_level nvram get ddns_enable_x nvram get ddns_hostname_x nvram get vpn_serverx_start
/jffs/scripts/wan-failover.sh update
***Dev Mode is Enabled***
wan-failover is out of date - Current Version: v2.0.0-beta4 Available Version: v2.0.0-beta5
Do you want to update to the latest beta version? v2.0.0-beta5 ***Enter Y for Yes or N for No***
> Y
wan-failover: Update - wan-failover has been updated to version: v2.0.0-beta5
wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute***
wan-failover: Restart - Killing wan-failover Process ID: 20664
wan-failover: Restart - Killed wan-failover Process ID: 20664
wan-failover: Restart - Killing wan-failover Process ID: 20665
wan-failover: Restart - Killed wan-failover Process ID: 20665
wan-failover: Restart - Killing wan-failover Process ID: 27697
wan-failover: Restart - Killed wan-failover Process ID: 27697
wan-failover: Restart - Killing wan-failover Process ID: 27698
wan-failover: Restart - Killed wan-failover Process ID: 27698
wan-failover: Restart - Waiting for wan-failover to restart from Cron Job
wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 28309 28314
/jffs/scripts/wan-failover.sh: line 5808: DNS: parameter not set
Published a minor fix for this, update again.Upgrade V2.0.0-beta4 to V2.0.0-beta5. Error at end of script I received from upgrade, otherwise appears to be running normally:
Code:/jffs/scripts/wan-failover.sh update ***Dev Mode is Enabled*** wan-failover is out of date - Current Version: v2.0.0-beta4 Available Version: v2.0.0-beta5 Do you want to update to the latest beta version? v2.0.0-beta5 ***Enter Y for Yes or N for No*** > Y wan-failover: Update - wan-failover has been updated to version: v2.0.0-beta5 wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute*** wan-failover: Restart - Killing wan-failover Process ID: 20664 wan-failover: Restart - Killed wan-failover Process ID: 20664 wan-failover: Restart - Killing wan-failover Process ID: 20665 wan-failover: Restart - Killed wan-failover Process ID: 20665 wan-failover: Restart - Killing wan-failover Process ID: 27697 wan-failover: Restart - Killed wan-failover Process ID: 27697 wan-failover: Restart - Killing wan-failover Process ID: 27698 wan-failover: Restart - Killed wan-failover Process ID: 27698 wan-failover: Restart - Waiting for wan-failover to restart from Cron Job wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 28309 28314 /jffs/scripts/wan-failover.sh: line 5808: DNS: parameter not set
Published a minor fix for this, update again.
/jffs/scripts/wan-failover.sh update
wan-failover is up to date - Version: v2.0.0-beta5
***Checksum Failed***
Current Checksum: 1f1774c62efbbdf23f7269bcffcd08c6ba04fcab75a011c9dd1aa464c28c42f9 Val id Checksum: 5056812515b10958f8bcc1ecb6436ad91091ab5b310ccd76ec854217fd2c642d
wan-failover is up to date. Do you want to reinstall wan-failover Version: v2.0.0-beta5 ? ***Enter Y for Yes or N for No***
> Y
wan-failover: Update - wan-failover has reinstalled version: v2.0.0-beta5
wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute***
wan-failover: Restart - Killing wan-failover Process ID: 4526
kill: can't kill pid 4526: No such process
wan-failover: Restart - Killing wan-failover Process ID: 28309
wan-failover: Restart - Killed wan-failover Process ID: 28309
wan-failover: Restart - Killing wan-failover Process ID: 28314
wan-failover: Restart - Killed wan-failover Process ID: 28314
wan-failover: Restart - Waiting for wan-failover to restart from Cron Job
wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 4888 4889
Successfully Restarted wan-failover Process ID(s): 4888,4889
/jffs/scripts/wan-failover.sh: line 5940: syntax error: unterminated quoted string
I’m not sure where your router sees the unterminated string, I can’t find it or replicate the error.Code:/jffs/scripts/wan-failover.sh update wan-failover is up to date - Version: v2.0.0-beta5 ***Checksum Failed*** Current Checksum: 1f1774c62efbbdf23f7269bcffcd08c6ba04fcab75a011c9dd1aa464c28c42f9 Val id Checksum: 5056812515b10958f8bcc1ecb6436ad91091ab5b310ccd76ec854217fd2c642d wan-failover is up to date. Do you want to reinstall wan-failover Version: v2.0.0-beta5 ? ***Enter Y for Yes or N for No*** > Y wan-failover: Update - wan-failover has reinstalled version: v2.0.0-beta5 wan-failover: Restart - Restarting wan-failover ***This can take up to approximately 1 minute*** wan-failover: Restart - Killing wan-failover Process ID: 4526 kill: can't kill pid 4526: No such process wan-failover: Restart - Killing wan-failover Process ID: 28309 wan-failover: Restart - Killed wan-failover Process ID: 28309 wan-failover: Restart - Killing wan-failover Process ID: 28314 wan-failover: Restart - Killed wan-failover Process ID: 28314 wan-failover: Restart - Waiting for wan-failover to restart from Cron Job wan-failover: Restart - Successfully Restarted wan-failover Process ID(s): 4888 4889 Successfully Restarted wan-failover Process ID(s): 4888,4889 /jffs/scripts/wan-failover.sh: line 5940: syntax error: unterminated quoted string
Shell check doesnt like something in restartwan0 ()I’m not sure where your router sees the unterminated string, I can’t find it or replicate the error.
Line 3850:
restartwan0 ()
^-- SC1009 (info): The mentioned syntax error was in this function.
Line 3851:
{
^-- SC1073 (error): Couldn't parse this brace group. Fix to allow more checks.
Line 3912:
[ ! -z "${wan0state+x}" ] &>/dev/null unset wan0state
^-- SC1056 (error): Expected a '}'. If you have one, try a ; or \n in front of it.
^-- SC1072 (error): Missing '}'. Fix any mentioned problems and try again.
^-- SC1140 (error): Unexpected parameters after condition. Missing &&/||, or bad expression?
$
Line 2966:
if [ ! -z "${WAN0DUALWANDEV+x}" ]] &>/dev/null;then
^-- SC1034 (error): Test expression was opened with single [ but closed with double ]]. Make sure they match.
Line 3120:
if [ ! -z "${WAN1DUALWANDEV+x}" ]] &>/dev/null;then
^-- SC1034 (error): Test expression was opened with single [ but closed with double ]]. Make sure they match.
Lol thank you, I’ll clean that up, those are new additions in this beta.Shell check doesnt like something in restartwan0 ()
Also
Code:Line 2966: if [ ! -z "${WAN0DUALWANDEV+x}" ]] &>/dev/null;then ^-- SC1034 (error): Test expression was opened with single [ but closed with double ]]. Make sure they match. Line 3120: if [ ! -z "${WAN1DUALWANDEV+x}" ]] &>/dev/null;then ^-- SC1034 (error): Test expression was opened with single [ but closed with double ]]. Make sure they match.
Minor revision to v2.0.0-beta5 has been published to address these issues. Thanks @Maverickcdn for the finds!Lol thank you, I’ll clean that up, those are new additions in this beta.
Edit: I found the problem in that function, missing && between commands at the end.
if [[ "$(nvram get wan1_state_t)" != "2" ]] >/dev/null;then
logger -t switchwan "WAN1 not connected, attempt restart"
service "restart_wan_if 1"
sleep 30
fi
I haven't used this script fully yet since I'm still waiting for my SIM card to come in the mail.BTW, here is a short snippet that might be useful built into wan-failover.
Once in a while my DSL modem goes into Cold Standby.
Before I call wan-failover, I check to see if it is Connected (Hot Standby). If not, I reset the wan interface.
This usually fixes it.
In my case, it's just WAN1 so it's hard coded to WAN1. Easy enough to do for WAN0 as well.
Code:if [[ "$(nvram get wan1_state_t)" != "2" ]] >/dev/null;then logger -t switchwan "WAN1 not connected, attempt restart" service "restart_wan_if 1" sleep 30 fi
It does, it checks state at start up.I haven't used this script fully yet since I'm still waiting for my SIM card to come in the mail.
But, shouldn't the script force the second WAN to always be active (hot standby)? Since it automatically does the ping periodically for both WAN interfaces?
Not gonna lie. I still don't understand the point of cold standby. It takes so much longer for Asus to do a failover when it's on cold standby.It does, it checks state at start up.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!