I am sorry, I have no idea how to do it, but I am also extremely interested into this. It would solve my "power off safely" problem, because I could use the button to unmount the HDD. Nice idea, let's wait for a solution. :-)
Hi all,
I want use the EZSetup button on the rear of my WL550GP as an input trigger for a script I have written and the PWR or AIR LED as a status indicator.
My question is how do I detect an EZSetup button press and how can I take control of the PWR and AIR LEDs?
Can I use “nvram get” to detect a EZSetup button press and can I use a “nvram set” to use one of the front LEDs?
The router is using oleg's firmware.
Any help would be greatly appreciated
I am sorry, I have no idea how to do it, but I am also extremely interested into this. It would solve my "power off safely" problem, because I could use the button to unmount the HDD. Nice idea, let's wait for a solution. :-)
It would be nice if we could have the press of the EZbutton latched on or off ie. 1 or 0 in order for a script not to miss a press of EZSetup between port polls. (maybe Oleg can help here? )
An example of that would be:
Pressing EZSetup:
Press 1: Bit in RAM gets latched to a 1
Press 2: Bit in RAM gets latched to a 0
Press 3: Bit in RAM gets latched to a 1
Etc..
It would also be necessary to have the option to reset the bit via a script using “nvram set” or similar so the script can acknowledge that the key was pressed.
SM
if you still need one - check this link out - it is in russian, but look for a script named mini-cron
http://wl500g.info/showthread.php?t=8403
have you had a look at the big database or forum of OpenWRT?
Maybe they have a solution.
Router: wl500g deluxe + 64MB SD -- OpenWRT Kamikaze 7.09
Packages: OpenVPN, SSH
NAS: NAS1000 400GB, TwonkyVision Media Server
WirelessClient: TG100, MGB100-"Schufti Style"
Have you read the changes and news in 1.9.2.7-7g firmware?
Simply add something like umount /opt line in /usr/local/sbin/ez-setup24. Pressing EZ SETUP button for 3 seconds would cause /usr/local/sbin/ez-setup to be executed
OK. I edited the "/usr/local/sbin/ez-setup" with vi. But when i write
and press the red button on the backside of the router (three or more seconds) nothing happens. That have probertly the reason that my samba server is still running. So i replaced it withumount /opt
but that doesent work too. What exactly should i write in the "ez-setup"? Or must i restart the router before it can work? I am a very linux beginner so please be patiant with me and dont hate me for for my stupid questions. And please dont blame me with my "english"killall smbd
killall nmbd
Satirac
edit: ok, i restarted the router with
but nothing changes...flashfs save && flashfs commit && flashfs enable && reboot
Last edited by satirac; 22-08-2007 at 19:41.
Have you made the script executable?
Does your script begin with #!/bin/shCode:chmod +x /usr/local/sbin/ez-setup
First of all you need to find out where the problem is. You need to check if script is executed at all and then check if there is a problem with commands within the script.
To check if the script is executed, just make it look something like
make it executable, save with flashfs...... and reboot. If the script is working properly, you should be able to find a file named "hello" in /opt/shareCode:#!/bin/sh touch /opt/share/hello
i made it executable but it doesnt beginn with
your "test-skript" works fine. Now i'll try to write a skript to stop samba and transmission and unmount my hdd#!/bin/sh
Thank you very much
Satirac