Technical data
B. Appendixes to optional packages
must be entered in HWSUPP_LED_\${i}_PARAM"
fi
fi
done
fi
LED Display
The command /usr/bin/hwsupp_setled <LED> <status>/ has to be executed to set a LED in
a package script (eg. /usr/bin/<opt>_setled)
The LED number can be found in /var/run/hwsupp.conf.
Status can be off, on or blink.
Example:
if [ -f /var/run/hwsupp.conf ]
then
. /var/run/hwsupp.conf
[ 0$hwsupp_led_n -eq 0 ] || for i in `seq 1 $hwsupp_led_n`
do
eval action=\$hwsupp_led_${i}
eval param=\$hwsupp_led_${i}_param
if [ "$action" = "<opt>" ]
then
if [ <myexpression> ]
then
/usr/bin/hwsupp_setled $i on
else
/usr/bin/hwsupp_setled $i off
fi
fi
done
fi
The actual state of a LED can be queried with /usr/bin/hwsupp_getled <LED>/. The result
will be off, on or blink.
B.10.2. Button extensions
B.10.3. Button action
In check/myopt.exp the list of button types allowed in HWSUPP_LED_x can be extended.
Beispiel:
+HWSUPP_BUTTON_TYPE(OPT_MYOPT) = 'myopt'
: ', myopt'
359










