#! /bin/sh # /etc/rc.d/boot.notice.audio # Give audio notice of completed bootup # INSTALL instructions: # Read all the commentary in this file before using, and configure as necessary. # Install this script as: # /etc/rc.d/boot.notice.audio # and set the permissions on this script by doing: # chmod 755 /etc/rc.d/boot.notice.audio # Run it from /etc/rc.d/rc.local or equivalent file for your distribution, # by adding this to the end: # /etc/rc.d/boot.notice.audio # This script will self install (for RedHat systems) if you run it as: # sh this_file install # You have to be "root" to do this. # This will run it from rc.local # Alternatively, if you want to have it run directly from your inittab, do: # sh this_file install inittab # That would probably work for any distribution. # Installation command block: if [ "$1" = install ]; then set -x grep boot.notice.audio /etc/rc.d/rc.local /etc/inittab && exit 1 cp $0 /etc/rc.d/boot.notice.audio chmod 755 /etc/rc.d/boot.notice.audio if [ "$2" != inittab ]; then echo "/etc/rc.d/boot.notice.audio" >> /etc/rc.d/rc.local else cp /etc/inittab /etc/inittab.save # for safety echo "au:2345c:once:/etc/rc.d/boot.notice.audio" >> /etc/inittab echo "Test this installation by running:" echo "telinit c" fi echo "Installation complete" exit fi # Licensed under the GPL (GNU public license: that means it's free, with No # warrantee whatsoever). # Send suggestions for improvements to lcr@onewest.net # Tell me if you want one for shutdown, too. (just try putting this at # end of the halt script, eg, /etc/rc.d/init.d/halt, for starters) # Begin useful script: set `/sbin/runlevel` if [ X$2 = X5 ] ; then # echo "We are in runlevel $2, so X is active." # Change to virtual text terminal one after a suitable pause to allow X to get # through shifting you to that (X) console: ( # Wait done in a backgound subshell to allow us to continue. # sleep 7 + 20 seconds, as necessary: sleep 7 sleep 20 # Change to the first virtual terminal: chvt 1 ) & fi # In case sound isn't working: echo -e "\a\c" # \a is the bell character sleep 1 # pause 1 second echo -e "\a\c" sleep 1 echo -e "\a\c" # repeat as desired play /usr/share/sounds/startup2.wav # You could also try (for the first serial port, if you have a # synth connected there): # Let me know if this works (I can't test it). # echo "System is booted, and speech is active." > /dev/ttyS0 # 2nd port: # echo "System is booted, and speech is active." > /dev/ttyS1