#!/bin/sh asound_backup.sh tmpfile=`mktemp` if [ -z "`grep "^[^#]*ctl.\!default" /etc/asound.conf`" ] then echo "ctl.!default { type pulse } " > $tmpfile cat -s /etc/asound.conf >> $tmpfile cat -s "$tmpfile" > /etc/asound.conf fi if [ -z "`grep "^[^#]*pcm.\!default" /etc/asound.conf`" ] then echo "pcm.!default { type pulse } " > $tmpfile cat -s /etc/asound.conf >> $tmpfile cat -s "$tmpfile" > /etc/asound.conf fi