ccimx6ul: pulseaudio: fix error during boot

On boot, ConnectCore 6UL was failing to start pulse audio since it was trying
to use journalctl as log target when systemd is not included.

Boot error:

   Starting Dropbear SSH server: dropbear.
   W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
   E: [pulseaudio] log.c: Invalid log target.
   E: [pulseaudio] cmdline.c: Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'.
   E: [pulseaudio] main.c: Failed to parse command line.
   Starting bluetooth: bluetoothd.

While on it change the 'connectcore-demo-server' priority to be launched after
pulseaudio when not using systemd.

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
This commit is contained in:
Tatiana Leon 2023-02-13 18:35:34 +01:00
parent 24f0f6ff79
commit be17cb5bc2
2 changed files with 4 additions and 2 deletions

View File

@ -85,7 +85,7 @@ RDEPENDS:${PN}-multimedia = " \
INITSCRIPT_PACKAGES = "${PN}-server"
INITSCRIPT_NAME:${PN}-server = "connectcore-demo-server"
INITSCRIPT_PARAMS:${PN}-server = "start 19 2 3 4 5 . stop 21 0 1 6 ."
INITSCRIPT_PARAMS:${PN}-server = "start 20 2 3 4 5 . stop 21 0 1 6 ."
SYSTEMD_PACKAGES = "${PN}-server"
SYSTEMD_SERVICE:${PN}-server = "connectcore-demo-server.service"

View File

@ -6,11 +6,13 @@
[ -f "/etc/profile.d/weston.sh" ] && source /etc/profile.d/weston.sh
[ -f "/etc/X11/Xsession.d/13xdgbasedirs.sh" ] && source /etc/X11/Xsession.d/13xdgbasedirs.sh
[ -z ${UID} ] && export UID="$(id -u)"
[ -z "${XDG_RUNTIME_DIR}" ] && export XDG_RUNTIME_DIR=/run/user/$UID
export DBUS_SESSION_BUS_ADDRESS=unix:path=${XDG_RUNTIME_DIR}/bus
pulseaudio --start --log-target=journal
type journalctl >/dev/null 2>&1 && log_target=journal || log_target=syslog
pulseaudio --start --log-target="${log_target}"
# Create a symlink to the daemon's PID file in a more accesible directory
ln -sf ${XDG_RUNTIME_DIR}/pulse/pid /run/pulse.pid