[ANNOUNCE] D-Bus 1.0 RC 2 (0.94) released
Havoc Pennington
hp at redhat.com
Sat Oct 14 15:22:09 PDT 2006
David Zeuthen wrote:
> This is broken. It breaks at least livecd, stateless, OLPC and other use
> cases where you never run things such as %post on the machine that boots
> the OS. The fix is easy though: the bus needs to run this on start-up
> and cache it in a file somewhere for future use.
It's OK to do this at boot time instead of in %post, but I think it's
more complicated so I recommended %post instead for the normal case.
There's already a note in the man page about the cases you mention. What
I suggested in the man page is to symlink the expected uuid file in /etc
to a file in /var, and run uuidgen on boot to create the file in /var
(it can go in the system bus init script, for example). You could also
modify libdbus to look in /var directly but there isn't a
--with-uuid-file configure option right now.
The mildly tricky things if it's in an init script are that it has to
run early enough, and has to run the first time dbus is installed (e.g.
%post has to be sure the uuid file exists).
A stateless/OLPC type of setup may not want to generate the uuid from
scratch on every boot; instead they might want to store it on the
network and fetch it from there on every boot or at network connection
time. I'm not sure.
Anyway, libdbus doesn't really care where the file comes from - "run in
%post" is just a suggestion.
The requirement is to be sure the uuid file exists someway/somehow.
Havoc
More information about the dbus
mailing list