Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > ab2173dee9acec0882077681534bc924 > files > 31

pulseaudio-0.9.15-2.1mdv2009.1.src.rpm

From 0d61260324003f980a7cb7b1cef2f67f579a2f52 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <development@colin.guthr.ie>
Date: Wed, 8 Oct 2008 20:13:15 +0100
Subject: [PATCH 500/505] Customise startup so we can easily disable PA

---
 src/daemon/start-pulseaudio-x11.in |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/daemon/start-pulseaudio-x11.in b/src/daemon/start-pulseaudio-x11.in
index 391a6d3..8ec6f3d 100755
--- a/src/daemon/start-pulseaudio-x11.in
+++ b/src/daemon/start-pulseaudio-x11.in
@@ -19,7 +19,23 @@
 
 set -e
 
-@PA_BINARY@ --start "$@"
+# Some Mandriva customisations
+if [ -r ~/.pulserc ]; then
+  CONFIG=~/.pulserc
+else
+  CONFIG=/etc/sysconfig/pulseaudio
+fi
+
+PULSE_ARGS=" --log-target=syslog"
+[ -r "$CONFIG" ] && . $CONFIG
+
+if [ "$PULSE_SERVER_TYPE" != "personal" ]; then
+  echo "Pulseaudio startup disabled due to configuration" >&2
+else
+
+@PA_BINARY@ --start ${PULSE_ARGS} "$@"
+
+# End Mandriva customisations (except for the "fi" below)
 
 if [ x"$DISPLAY" != x ] ; then
 
@@ -30,3 +46,5 @@ if [ x"$DISPLAY" != x ] ; then
 	@PACTL_BINARY@ load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null
     fi
 fi
+
+fi
-- 
1.6.3.2