Created
May 7, 2014 22:36
-
-
Save weirdbricks/f86c14c53c35c8f7930f to your computer and use it in GitHub Desktop.
beep.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
#checks if the speaker module is loaded - if not it loads it and makes a be | |
#based on http://forums.freebsd.org/viewtopic.php?t=12001 | |
module=`kldstat | grep speaker -c` | |
if [ $module -eq 0 ] | |
then | |
echo "speaker module not found - adding" | |
kldload speaker | |
fi | |
#now beep! | |
echo "BP" > /dev/speaker | |
echo "SO4L16G>L8C." > /dev/speaker | |
echo "BP" > /dev/speaker | |
echo "SO4L16G>L8C." > /dev/speaker | |
#and make a notice to dmesg | |
logger -p kern.crit COMPLETE!!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment