From 820b68313794bc658cd664cbfd7adddbcfcd2cf8 Mon Sep 17 00:00:00 2001 From: henryk Date: Sun, 11 Nov 2007 04:48:36 +0000 Subject: Add fancy out-of-band successful/failed indications git-svn-id: https://svn.openpcd.org:2342/trunk@321 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/at91flash_automatic | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'openpicc/at91flash_automatic') diff --git a/openpicc/at91flash_automatic b/openpicc/at91flash_automatic index 40c23a9..8f92989 100755 --- a/openpicc/at91flash_automatic +++ b/openpicc/at91flash_automatic @@ -33,11 +33,26 @@ flash $FLASH_FILE ENDOFMYTEXT } +blink_thinklight() { + if [ ! -w /proc/acpi/ibm/light ]; then return; fi + OLDSTATUS=`grep status < /proc/acpi/ibm/light | awk '{print $2;}'` + if [ "${OLDSTATUS}" = "off" ]; then + echo "on" > /proc/acpi/ibm/light + sleep 1 + echo "off" > /proc/acpi/ibm/light + else + echo "off" > /proc/acpi/ibm/light + sleep 1 + echo "on" > /proc/acpi/ibm/light + fi +} + flashing_failed() { - : + aplay /usr/kde/3.5/share/sounds/KDE_Error.wav > /dev/null 2>&1 } flashing_successful() { - : + blink_thinklight & + aplay /usr/kde/3.5/share/sounds/KDE_Notify.wav > /dev/null 2>&1 } do_detect() { -- cgit v1.2.3