From b5593ec19bf693c55e35f88bbce7b45a1381d986 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 8 Jan 2009 11:37:23 +0100 Subject: added some usefull scripts bin/Xshutdown.sh - graphical script for shutdown/reboot/standby sbin/set_governor - set the governor of both cpus sbin/keyword_package - adds a package to /etc/portage/packages.keywords sbin/asound_backup.sh - creates a backup of /etc/asound.conf sbin/asound_pulse_disable.sh - removes the default references to pulse sbin/asound_pulse_enable.sh - adds pcm.!default und ctl.!default references to pulse --- sbin/asound_pulse_enable.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 sbin/asound_pulse_enable.sh (limited to 'sbin/asound_pulse_enable.sh') 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 -- cgit v1.2.3