diff options
author | Rod Whitby <rod@whitby.id.au> | 2008-09-21 08:44:53 +0000 |
---|---|---|
committer | Rod Whitby <rod@whitby.id.au> | 2008-09-21 08:44:53 +0000 |
commit | 76471bb14b1d3d6e17b3ac491f780dbc0a1e3514 (patch) | |
tree | 1c13756adf4bbb0dfcf76081034a92d3afe3be7e /packages | |
parent | f63b6b7a4d9300dcdf611f83491b77b1a2d45b40 (diff) | |
parent | cde2749268299a0f28ca654074239f283667635d (diff) |
merge of '2a7482626b33acc99e7f2e051248f4b8c14ba8b6'
and '376b2801a236cb7fb928cf8f4799e6a4f94fc93f'
Diffstat (limited to 'packages')
-rw-r--r-- | packages/slugos-init/files/leds | 14 |
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 |