FindPage
View Source:
UdevSounds
Note:
You are viewing an old version of this page.
View the current version.
/etc/udev.rules/00-bling.rules: <verbatim> RUN+="/tmp/sounds/hw.sh" </verbatim> /tmp/sounds/hw.sh: <verbatim> #!/bin/bash #logger -t "hw.sh" "$(whoami) Honoring ${ACTION} for ${SUBSYSTEM}..." if [ "${SUBSYSTEM}" != "usb" ] then exit 0 fi if [ "${ACTION}" = "add" ] then /usr/bin/aplay /tmp/sounds/hw_insert.wav & exit 0 elif [ "${ACTION}" = "remove" ] then /usr/bin/aplay /tmp/sounds/hw_remove.wav & exit 0 fi </verbatim> Salt and pepper to taste...