* John kerry <kerry9...@gmail.com> [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" > > /sys/devices/platform/leds-gpio/leds/db120:green:status/brightness > } > } > > fi ^^^^ remove the 'fi'
please change the first line to e.g. [ "$ACTION" = "pressed" -a "$BUTTON" = "BUT_2" -a "$INTERFACE" = 'wan' ] && { INTERFACE is the 'name' of the device, e.g. 'wan' or 'lan' DEVICE is the real thing, e.g. eth0.1 > Am i doing any mistake or need to change anything you can always TEST you script with e.g. set -x INTERFACE=bla DEVICE=blubb . name_of_your_script set +x bye, bastian _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel