summaryrefslogblamecommitdiffstats
path: root/sbin/asound_pulse_enable.sh
blob: c3d0caeb626bb38dba7ecf47710e33adf1e9ead5 (plain) (tree)

























                                                         
#!/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