#!/bin/sh case $1 in setSpeakers) . /etc/init.d/rc.functions if ( [ "$PASSTHROUGH_DEVICE" == "-" ] ) && ( [ "$XINELIBOUTPUT_SPEAKER" == "Pass Through" ] ); then echo "Bitte noch das Pass Through Device setzen!" fi update_config "audio.output.speaker_arrangement" "audio.output.speaker_arrangement:$XINELIBOUTPUT_SPEAKER" /root/.xine/config_xineliboutput ;; setPassThroughDevices) . /etc/init.d/rc.functions if ( [ "$PASSTHROUGH_DEVICE" == "-" ] ) || ( [ "$XINELIBOUTPUT_SPEAKER" != "Pass Through" ] ); then update_config "audio.device.alsa_passthrough_device" "#audio.device.alsa_passthrough_device:$PASSTHROUGH_DEVICE" /root/.xine/config_xineliboutput elif ( [ "$XINELIBOUTPUT_SPEAKER" == "Pass Through" ] ) && ( [ "$PASSTHROUGH_DEVICE" != "-" ] ); then cards="$(echo "$PASSTHROUGH_DEVICE" | sed "s/,/\n/g")" echo -e "$cards" | { read card device name update_config "audio.device.alsa_passthrough_device" "audio.device.alsa_passthrough_device:hw:$card,$device" /root/.xine/config_xineliboutput } else echo "Bitte noch das Speaker arrangement setzen" fi ;; esac