What's new

wan-event script not executed

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

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 ^^
 

Latest threads

Sign Up For SNBForums Daily Digest

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