1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wireless Script help

Discussion in 'Tomato Firmware' started by Low-WRT, Jan 5, 2009.

  1. Low-WRT

    Low-WRT LI Guru Member

    What's wrong with my script?
    I'm trying to alter it to work on a Buffalo g125.
    The purpose is to show when a wireless client is connected, by the red "DIAG" turning on. Also, it's supposed to ignore my ethernet bridge.
    Thanks!

    Code:
    while sleep 20; do
    minusbridge=$(wl assoclist | grep -v aa:bb:cc:dd:ee:ff)
    if [ -n "$minusbridge" ] ; then
    LED='gpio enable 7'
    else
    LED='gpio disable 7'
    fi
    done
     
  2. Planiwa

    Planiwa LI Guru Member

    Might try swapping enable/disable; "led diag on" and "led diag off" are more intuitive.
     
  3. Low-WRT

    Low-WRT LI Guru Member

    That did it! Thanks so much for the help!

    Code:
    while sleep 20; do
    minusbridge=$(wl assoclist | grep -v aa:bb:cc:dd:ee:ff)
    if [ -n "$minusbridge" ] ; then
    led diag on
    else
    led diag off
    fi
    done
     

Share This Page