systemd (Was Re: tmpfs for strategic directories)

Lennart Poettering mzerqung at 0pointer.de
Tue Jun 1 00:44:32 UTC 2010


On Wed, 26.05.10 13:08, Colin Walters (walters at verbum.org) wrote:

> >> I beg to differ. I've had to create or modify initscripts quite often,
> >> either as a sysadmin or a packager. If this is now going to require C
> >> coding skills, I'm not going to be able to do it. I don't think it's
> >> safe to assume that everyone who needs to write or modify an initscript
> >> is going to know C. What about people who write apps that need
> >> initscripts in some other language?
> >
> > THERE ARE NO PLANS TO SHIP COMPILED INIT SCRIPTS OR ANYTHING LIKE THAT!
> >
> > The plan is to reduce what is currenlty done in files like
> > /etc/init.d/messagebus to files like
> > http://0pointer.de/public/dbus.service.
> 
> Also:
> 
> > Description=D-Bus System Bus
> 
> This seems unnecessary.  Can we default to the name of the script?  If
> this isn't translated, I don't see how it's more interesting than just
> "dbus".

Later on this shall be translatable, the same way as the Comment field
of .desktop files.

And if you omit this option we'll already default to the unit name, the
way you suggsted.

> 
> > Requires=basic.target sockets.target dbus.socket
> > After=basic.target sockets.target dbus.socket
> 
> What does this goop mean and why is it necessary?

basic.target encapsulates the early boot process (kinda the same stuff
rc.sysinit currently does). The Requires= make sure that this is pulled
in by dbus.service. The After= makes sure that it has finished before we
fork dbus.

And ignore the sockets.target/dbus.socket stuff, that I had in there for
debugging only. It's not necessary, and completely redundant. It will
not be in the final version of this .service file.

The reason why basic.target is explicitly mentioned in the .service file
is that we want to handle early boot and normal daemon start-up with the
same .service files. This is different from launchd for example, where
early boot is basically a shell script handled completely independently
and differently from normal services. I think we need more flexibility
there, simply because we have to cover way more than Apple has to when
it comes to plugging something into early boot. The price for that is
that normal daemons that are started in "late boot", have to add these
Requires= and After= lines for basic.target. 

This felxible design has various other advantages too, for example we
can blur the destinction between early and late boot a bit and remove
the synchronization point that seperates them, for selected services.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the devel mailing list