What's new

wan-event script not executed

slytho

Regular Contributor
Hi!

My old wan-start worked fine. After updating to firmware .15 I renamed it to wan-event and adapted it to consider the new parameters. But it doesn't call the "wan-event-connected.user script" anymore in its code. What is wrong with the following code of the wan-event script?

Code:
#!/bin/sh

if [ -z $2 ]
then
  logger "Script has not received parameters, aborting."
  exit 1
fi

if [ "$2" -eq "connected" ]
then
  . /jffs/scripts/wan-event-connected.user
fi

And running the above wan-event script on the command line by
Code:
sh wan-event 0 connected
trying to simulate the parameters only produces following error:
Code:
: connected: bad number
 
Aww, darn ... thank you ... changed "-eq" to "=". I overlooked that.

Now it works ... hurray ^^
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Back
Top