Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Feb 22, 2010 7:35 Post subject:
1. #!/bin/sh
2.
3. sleep 1
4. if "$(nvram get wl0_security_mode)" != "disabled"
5. then
6. gpio enable 3
7. else
8. gpio disable 3
9. fi _________________ The New Me
How about changing the extension to .sesbutton , does it work when you push the button? _________________ Kernel panic: Aiee, killing interrupt handler!
Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Feb 22, 2010 14:59 Post subject:
LOM wrote:
So the automatic execute of .if files is broken..
I didn't think about that, but your probably right. I am at work, so I will try to downgrade FW and see where it starts working again. _________________ The New Me
Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Mon Feb 22, 2010 20:33 Post subject:
Any body with a 300n v1.1 that the security light works correctly please post. Even if it don't work properly please post. _________________ The New Me
Emildev was spot on with how to correctly execute the original script (but the script had disable/enable mixed up). It was designed to run as a background process, but now you've stripped out the loop so it will only check once and then exit. Removing the loop is how you would correctly adapt it as a .if script but it seems that not only are .if script gone, but also .ipup and .ipdown scripts as well. I can find no mention of any of the 3 in the source code.
You can rewrite it to be a single line in your startup script like so:
while sleep 1; do if [ `nvram get wl0_security_mode` = "disabled" ]; then gpio enable 3; else gpio disable 3; fi; done &
Tested and confirmed that this does fix the security LED on my wrt300n v1.1 though I never look at it anyways. _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)