Dbus service autostart


#1

Hi,

I have a Red with wp76 running the latest firmware and legato 18.04. I’m trying to use the Dbus message bus service in one of our apps but it does not seem to autostart even though the init.d script is enabled to run. I see these message being logged during boot up

chown: unknown user messagebus
chgrp: unknown group messagebus
Starting system message bus: start-stop-daemon: unknown user messagebus
dbus.

Anybody experience a similar problem and found a solution?


#2

I would guess that you just need to create that user/group. I am not sure what the idiomatic way to do that is in a yocto system


#3

Thank you the reply @dfrey.

I thought the same thing, but that user/group is actually there but is somehow not present when the init.d script is run during start up. I haven’t looked into what the Legato framework does to user/groups but it seems to me that the messagebus user/group is being created later. I was looking at changing the run level for the Dbus init script so that it runs after Legato is initialized but the read-only file system prevents me from doing that. I would have to change that from the yocto build which I haven’t gotten around to trying and was wondering if anyone found a better way.

I failed to mention that executing

/etc/init.d/dbus-1 start

from the command prompt (i.e. after boot up is complete) starts Dbus succesfully.


#4

Perhaps the modifications to the user and group files are part of the overlays and dbus is starting before it’s mounted.