summaryrefslogtreecommitdiff
path: root/packages/slugos-init/files/leds
diff options
context:
space:
mode:
Diffstat (limited to 'packages/slugos-init/files/leds')
-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