diff options
Diffstat (limited to '')
-rwxr-xr-x | sbin/asound_pulse_enable.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sbin/asound_pulse_enable.sh b/sbin/asound_pulse_enable.sh new file mode 100755 index 0000000..c3d0cae --- /dev/null +++ b/sbin/asound_pulse_enable.sh @@ -0,0 +1,26 @@ +#!/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 |