[Alix 2] Basic working solution to drive the front LEDs

Forums Network Management ZeroShell [Alix 2] Basic working solution to drive the front LEDs

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #44361


    Sorry I still have no solution to make a front LED of the Alix show the network activity. πŸ˜₯

    But I could find a little program with some features and doctor it to provide the basic functions. This script is self-explanatory.

    I did not implement the CPU and disk activity, it would be easy to add. But my LED #2 is reserved for WAN activity, when I can do it… πŸ™„

    # set-alix-led.include.sh
    # This script can be included by any script having to drive a LED on a Alix system.
    # It relies on the very limited possibilities of the operator alix-leds that can be
    # found there: http://linux.1wt.eu/alix/util/
    # - the executable can be found in alix-leds-3.0-flx0.1-i386.tgz,
    # - the source file can be found in alix-leds-3.0.tgz (for real functionalities).
    # Arguments:
    # $1 = 1|2|3 (actually not verified, if you want to play, have fun...)
    # = the LED to operate. LED #1 is the leftmost, normally it is permanently lit on Alix.
    # $2 = on|off|slow|fast
    # = what to do: switch on, off or set to blinking slow or fast.


    SetLed() # $1 = 1|2|3, $2 = on|off|slow|fast
    # Here is all what I can do with that poor operator 'alix-leds':
    # - start monitor an existing/unexisting NIC to tun the LED on/off,
    # - immediately kill the process become useless :-(
    # - for slow|fast blinking the process must remain,
    # - so it has to be killed first before any change.

    if [ -f $ZtPidFile ]; then
    kill $(cat $ZtPidFile) ;
    rm -rf $ZtPidFile ;
    case "$2" in
    alix-leds -l $1 -i $ZtNicAlwaysUp -p $ZtPidFile ;
    kill $(cat $ZtPidFile) ;
    rm -rf $ZtPidFile ;
    alix-leds -l $1 -i $ZtNicNotExisting -p $ZtPidFile ;
    kill $(cat $ZtPidFile) ;
    rm -rf $ZtPidFile ;
    alix-leds -l $1 -r -p $ZtPidFile ;
    alix-leds -l $1 -R -p $ZtPidFile ;
    echo -e "set-alix-led.include.sh: SetLed( $1, $2) not implemented.n"

    The URL clickable: http://linux.1wt.eu/alix/util/

    See also this topic: https://www.zeroshell.org/forum/viewtopic.php?t=743 πŸ˜•

    Now I use this script in my project [Janus / twin Alix2] and it works very fine. πŸ˜€

    Hope it can help.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.