Index: src/daemon/esdcompat.in =================================================================== --- src/daemon/esdcompat.in (revision 2082) +++ src/daemon/esdcompat.in (working copy) @@ -26,8 +26,37 @@ exit 1 } -ARGS=" --log-target=syslog" +# Start Mandriva customisation +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 "Not starting PulseAudio daemon due to sysconfig setting." >&2 + exit +fi + +# Do some pid file tidy up +PIDFILE=/tmp/pulse-$USER/pid +if [ -f $PIDFILE ]; then + PID=$(cat $PIDFILE) + if [ -f /proc/$PID/status ]; then + PNAME=$(cat /proc/$PID/status | grep ^Name | awk '{ print $2 }') + if [ "pulseaudio" != "$PNAME" ]; then + # This is a bogus pid file and pulse will fail to start. + rm -f $PIDFILE + fi + fi +fi + +ARGS=" $PULSE_ARGS" +# End Mandriva customisation + while [ "$#" -gt "0" ]; do case "$1" in