#! /bin/sh
### BEGIN INIT INFO
# Provides:          fix-sound
# Required-Start:    $remote_fs $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Hack around a udev trigger/alsa/mute bug
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

case "$1" in
    start)
    	start-stop-daemon --start --background --exec /etc/init.d/fix-sound -- background
        ;;
    background)
    	sleep 15
    	/etc/init.d/alsa-utils start
    	amixer sset PCM 100% # sound is initially too soft on sudbury 
	;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac
