summaryrefslogtreecommitdiff
path: root/packages/slugos-init/files
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2008-09-21 08:41:43 +0000
committerRod Whitby <rod@whitby.id.au>2008-09-21 08:41:43 +0000
commitcde2749268299a0f28ca654074239f283667635d (patch)
treec20e3ac48b7b1ad7d071f6d131a345e71b85dc13 /packages/slugos-init/files
parent95b72ace096bafa94249fe009ebf600fa5171b75 (diff)
slugos-init: leds: Apply patch for varying input event number (from Gordon Farquharson)
Diffstat (limited to 'packages/slugos-init/files')
-rw-r--r--packages/slugos-init/files/leds14
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/slugos-init/files/leds b/packages/slugos-init/files/leds
index 7a51a247ef..c5ce2997cc 100644
--- a/packages/slugos-init/files/leds
+++ b/packages/slugos-init/files/leds
@@ -180,12 +180,22 @@ sysled(){
# does nothing if there is no beep executable, is very
# quiet in the presence of errors
beep(){
- local arg
+ local arg devices module
arg=
test "$1" = beep && shift
if test -x /bin/beep
then
- test -c /dev/buzzer && arg="-e /dev/buzzer"
+ devices=`ls -d /sys/class/input/event*`
+ for device in $devices
+ do
+ module=`egrep PHYSDEVDRIVER $device'/uevent' | cut -d '=' -f 2`
+ if test "$module" = "ixp4xx-beeper";
+ then
+ devnode=`echo "$device" | cut -d '/' -f 5`
+ arg="-e /dev/input/"$devnode
+ break
+ fi
+ done
/bin/beep $arg "$@" 2>/dev/null
fi
return 0