#!/bin/sh #------------------------------------------------------------------------------ # /usr/bin/hwsupp_setled __FLI4LVER__ # # Creation: 10.10.2014 cspiess # Last Update: $Id$ #------------------------------------------------------------------------------ trigger="/var/run/hwsuppd/hwsupp-led$1/trigger" brightness="/var/run/hwsuppd/hwsupp-led$1/brightness" if [ -f $trigger -a -f $brightness ] then trig=$(sed "s/.*\[\(.*\)\].*/\1/" $trigger) case $trig in none|timer) case $2 in on) echo none > $trigger echo 1 > $brightness ;; off) echo none > $trigger echo 0 > $brightness ;; blink) echo timer > $trigger ;; esac ;; # don't set LED if trigger is active (eg. bootled) esac fi