Hi ,

[ "$ACTION" = "pressed" ] && [ "$BUTTON" = "lanwifi" ] && [ "$INTERFACE" =
"wan" ] &&
  {
     devstatus "$MYDEV" | grep '"up": true' &&
     {

        echo "" > /dev/console
        echo "SWITCH TO RJ45" > /dev/console
        echo "255" >
/sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
      }
   }

even i checked on http://www.shellcheck.net/ , its not giving any feedback,
it seems correct but still its not working.

I writing this script under /etc/hotplug.d/button/50-button file.

I have to change any other file?

Regards,
john

On Wed, Sep 16, 2015 at 2:43 PM, Bastian Bittorf <bitt...@bluebottle.com>
wrote:

> * John kerry <kerry9...@gmail.com> [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 '$'
>
> please learn shell-scripting. maybe it's an good idea to use a static
> checker like http://www.shellcheck.net/
>
> >    {
> >         devstatus "$MYDEV" | grep '"up": true' &&
> >        {
> >             echo "255" >
> > /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness
> >         }
> >     }
> >
> >
> > but its not working.
> >
> > What mistake i am doing.
>
> bye, bastian - greetings to china?!
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to