PulseAudio Show Stopper
Jump to navigation
Jump to search
...well, Jimmeny Cricket, noticing a pattern in late 2024 on OpenWRT 23.05.05 where the /etc/init.d/pulseaudio and /etc/init.d/mpd are configured such that both services are essentially useless because of changes in the init.d files.
See the MPD Show Stopper for information on that.
For PulseAudio, it is a mystery.
Below is the /etc/init.d/pulseaudio file from version 23.05.03, which works;
#!/bin/sh /etc/rc.common
# Copyright (C) 2011 OpenWrt.org
START=99
STOP=65
USE_PROCD=1
PROG=/usr/bin/pulseaudio
### The below script is for reconnecting bluetooth (set MAC Addresses of device(s) and controller(s) in the /etc/bluetooth.sh script)
PROG2="/etc/bluetooth.sh"
start_service() {
[ -d /var/run/pulse ] || {
mkdir -m 0755 -p /var/run/pulse
chmod 0750 /var/run/pulse
chown pulse:pulse /var/run/pulse
}
[ -d /var/lib/pulse ] || {
mkdir -m 0755 -p /var/lib/pulse
chmod 0750 /var/lib/pulse
chown pulse:pulse /var/lib/pulse
}
# Test for existence of /dev/mixer and /dev/dsp and create them if they don't exist
[ -e /dev/mixer ] || {
mknod /dev/mixer c 14 0
chmod 664 /dev/mixer
chown root:pulse /dev/mixer
}
[ -e /dev/dsp ] || {
mknod /dev/dsp c 14 3
chmod 664 /dev/dsp
chown root:pulse /dev/dsp
}
chown root:pulse /dev/snd/*
chmod 664 /dev/snd/*
procd_open_instance
procd_set_param command $PROG --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1
procd_close_instance
sleep 2
procd_open_instance
procd_set_param command "$PROG2"
procd_close_instance
}
Solution: Figuring out the difference it is painfully evident the --disallow-module-loading Directive is the culprit. Why? Just why? What's the point? Security? If so, when security eliminates functionality, then leaving it off or not using it at all is the equivalent solution, which is NOT acceptable.