[systemd-devel] [PACKAGERS] Packaging systemd >= 20

Lennart Poettering lennart at poettering.net
Sat Mar 5 05:47:17 PST 2011


On Sat, 05.03.11 12:02, Andrey Borzenkov (arvidjaar at mail.ru) wrote:

> 
> On Sat, Mar 5, 2011 at 11:30 AM, Tom Gundersen <teg at jklm.no> wrote:
> > On Sat, Mar 5, 2011 at 3:54 PM, Andrey Borzenkov <arvidjaar at mail.ru> wrote:
> >> systemd-machine-id-setup is run before anything (including /var) is
> >> mounted. How possible to initialize it from /var which is not
> >> available?
> >
> > If I understand correctly, systemd-machine-id-setup should be run at
> > install time, and not at boot-time, so /var will be available.
> 
> Oh, my apologies, I confused binary with internal function that runs
> early. You are absolutely right.

Actually the code run at boot in PID 1 is identical to the code of in
systemd-machine-id-setup. However if you run the binary during package
installation it will be able to access /var and be able to write to
/etc/machine-id. If run at boot both of these things will most likely
fail, but that's completely fine.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list