[artix-general] Fixes for dbus-s6

Dudemanguy dudemanguy at artixlinux.org
Thu Dec 3 01:44:03 CET 2020


On 12/2/20 4:10 AM, Yunxiang Li via artix-general wrote:
> In dbus-s6 the init script overwrites /etc/machine-id everytime, however
> machine-id should not change across reboots. This causes problems for programs
> that expects this behavior, like pulseaudio which stores their setting in a file
> named after the machine-id, therefore it will not remember the settings if
> rebooted.
> 
> The fix is simple, change the second line of /etc/s6/sv/dbus-srv/run to
> 
> foreground { dbus-uuidgen --ensure=/etc/machine-id }
> 
> It might be better to use the default location for the machine-id, which is
> /var/lib/dbus/machine-id and make /etc/machine-id a symlink to it, in which case
> we can just use
> 
> foreground { dbus-uuidgen --ensure }
> 
> I'm not sure how would this change be done tho, at least /var/lib/dbus needs to
> be created somehow.
> 

The dbus-uuidgen page says:
 >The important properties of the machine UUID are that 1) it remains
unchanged until the next reboot
https://dbus.freedesktop.org/doc/dbus-uuidgen.1.html

So it should be fine for it to change on every reboot. I'm not sure what
pulseaudio setting exactly expects the UUID to always be the same, but
that doesn't sound like correct behavior. Technically, the script as it
is will always overwrite machine-id if you bring down and back up
(something you probably shouldn't do but still). That could be improved.

That being said, the page does also mention using
/var/lib/dbus/machine-id. I'm not sure what Arch does here exactly. It
seems like a good idea to try and implement it somehow though.


More information about the artix-general mailing list