why do we use systemd?

Garry T. Williams gtwilliams at gmail.com
Sun Jul 6 23:36:22 UTC 2014


On 7-6-14 10:39:11 lee wrote:
> "Garry T. Williams" <gtwilliams at gmail.com> writes:
> > The analogy is placing a script in /etc/init.d and then linking
> > its name in the /etc/rc5.d directory.
> >
> > I find this much simpler than the sysvinit schemes.
>
> You have taken well over 100 lines to give a description about how
> to get a daemon started with systemd, not to mention the hours you
> must have spent reading all the documentation to figure out how to
> do what you wanted.

Of course, my message was an attempt to explain what a Unit is to
Patrick.  The bulk of my reply was not describing how to get a daemon
started with systemd.

As to the hours of reading, well, yes.  systemd was new when I first
encountered it.  How else could I learn how it works without actually
reading the documentation?

> It took you only 2 lines to describe how to do the same thing with
> sysvinit.

Yes.

But have you looked at the sysvinit script to compare it to the
Service unit that accomplishes the same thing?  Here's an example:

    http://0pointer.de/public/abrtd 

The point is that there is lots of boilerplate in every sysvinit
script to do the simplest task.  The systemd Service unit
corresponding to the abrt init script is way simpler.  And it can
accomplish stuff the bare script cannot, like automatic restart upon
failure.

This might help in comparing the two:

    http://0pointer.de/blog/projects/systemd-for-admins-3.html 

> I don't understand how you can find systemd "much simpler" than
> sysvinit.  Where and how is it simpler than sysvinit?  It takes only
> about 2% of the effort, if that much, to start a daemon with
> sysvinit than it takes to do the same with systemd.
>
> For systemd, you even have to learn a whole new "programming
> language" to create configuration files which is useless anywhere
> else.  Efficiency is negative here.

Reading the documentation, I know that the unit files do not contain
*any* "programming language".  They are declarative.  That was very
intensional in systemd's design.  Indeed, there have been many
discussions and patches submitted to add that very thing to the unit
files on the systemd development mailing list.  These have been
uniformly rejected because of this basic design.

Yes, you do have to read and understand the documentation to
successfully use systemd.  I'll leave it to others to comment on the
usefulness of a Unit file outside of Fedora.

-- 
Garry T. Williams



More information about the users mailing list