Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-16 Thread Bastian Bittorf
* John kerry [16.09.2015 11:32]: > even i checked on http://www.shellcheck.net/ , its not giving any feedback, > it seems correct but still its not working. add 1 line on top of your script for debugging: set | logger and check with 'logread -f' the output when you press

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-16 Thread Bastian Bittorf
* John kerry [16.09.2015 08:10]: > Hi, > > I have changed the script as below: > > MYDEV='eth0.2' > > ["$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" -a "INTERFACE" = 'wan'] && ^^^ a space here, so [ "$ACTION" - the same at the end: 'wan' ] use "$INTERFACE" with the '$'

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-16 Thread John kerry
Hi , [ "$ACTION" = "pressed" ] && [ "$BUTTON" = "lanwifi" ] && [ "$INTERFACE" = "wan" ] && { devstatus "$MYDEV" | grep '"up": true' && { echo "" > /dev/console echo "SWITCH TO RJ45" > /dev/console echo "255" >

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-16 Thread Bastian Bittorf
* John kerry [16.09.2015 12:18]: > I am getting below log: ok, i see: INTERFACE is not set, so you have to remove the check for this var and hardcode it. please stop sending mails like this, debug on your own with a local friend. bye, bastian

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-16 Thread John kerry
Hi, I understand its not good to mail like this, But I am quite new on this and even no body knows in my friends about this. Could you please help I hard coded the interface as below: set | logger [ "$ACTION" = "pressed" ] && [ "$BUTTON" = "lanwifi" ] && { devstatus "eth0.2" | grep

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi, I have changed the script as below: MYDEV='eth0.2' ["$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" -a "INTERFACE" = 'wan'] && { devstatus "$MYDEV" | grep '"up": true' && { echo "255" > /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness }

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi, I have tried script: *["$ACTION" = "pressed" -a "$BUTTON" = "BUT_2"] && { ["${ACTION}" = "ifup" -a "${INTERFACE}" = "wan"] && {echo "" > /dev/console echo "SWITCH TO RJ45" > /dev/consoleecho "255" > /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Please can anyone reply On Tue, Sep 15, 2015 at 2:16 PM, John kerry wrote: > Hi, > > I have written the following condition in /etc/hotplug.d/button/50-wps file > if [ "$ACTION" = "pressed" -a "$BUTTON" = "lanwifi" ]; then > echo "" > /dev/console > echo

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread Rafał Miłecki
On 15 September 2015 at 09:17, John kerry wrote: > Please can anyone reply Is someone here your paid support with 1h response time? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread Bastian Bittorf
* John kerry [15.09.2015 08:52]: > I have to write some condition in > /etc/hotplug.d/button/50-wps/ file > > I have to configure cat /etc/hotplug.d/button/00-wps file for following > condition: > if [ "$BUTTON" = "BTN_2" ] && [ "$ACTION" = "pressed" ]; then > > I have to

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi, I have written the following condition in /etc/hotplug.d/button/50-wps file if [ "$ACTION" = "pressed" -a "$BUTTON" = "lanwifi" ]; then echo "" > /dev/console echo "SWITCH TO RJ45" > /dev/console echo "255" >

[OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi, I have to write some condition in /etc/hotplug.d/button/50-wps/ file I have to configure cat /etc/hotplug.d/button/00-wps file for following condition: if [ "$BUTTON" = "BTN_2" ] && [ "$ACTION" = "pressed" ]; then I have to check eth0.1 if link is up then have ON status led otherwise OFF.

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John Crispin
On 15/09/2015 09:27, Rafał Miłecki wrote: > On 15 September 2015 at 09:17, John kerry wrote: >> Please can anyone reply > > Is someone here your paid support with 1h response time? although i find this emails annoying and funny at the same time we can probably assume that

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi, I have added following condition but its not working: MYDEV='eth0' if [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" ] && { devstatus "$MYDEV" | grep '"up": true' && { echo "255" > /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness } } fi Am i doing any mistake or

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread John kerry
Hi, If i am configuring below config under /etc/config/system file , The STATUS LED working fine based on eth0 link up/down. config led 'led_status' option name 'STATUS' option interval '50' option sysfs 'db120:green:status' option default '0' option

Re: [OpenWrt-Devel] OpenWrt /etc/hotplug.d/button/00-wps

2015-09-15 Thread Bastian Bittorf
* John kerry [15.09.2015 13:44]: > Hi, > > I have added following condition but its not working: > > MYDEV='eth0' > > if [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" ] && { remove the 'if' > devstatus "$MYDEV" | grep '"up": true' && { > echo "255" > >