LWN.net Logo

systemd & the tightly couple core band vs a world of many inits

systemd & the tightly couple core band vs a world of many inits

Posted Apr 28, 2012 22:49 UTC (Sat) by speedster1 (subscriber, #8143)
In reply to: systemd & the tightly couple core band vs a world of many inits by vonbrand
Parent article: Shuttleworth: Quality has a new name

> To me, the baroque SysVinit scripts are some of the more opaque code I've ever seen. This stuff is definitively not easily hackable at all (yes, I had to tweak some of those scripts and even wrote a few very simple ones from scratch).

I'm curious which startup scripts you ran across that were a painful mess. I've dealt with plenty of classic init scripts on RHEL/CentOS, debian, and embedded systems and none of those seemed hard to customize when needed. Plenty of startup scripts for custom services as well. Wondering if our standards for painful shell code are different, or if you were poking in an area that I never had to modify.


(Log in to post comments)

systemd & the tightly couple core band vs a world of many inits

Posted Apr 28, 2012 23:40 UTC (Sat) by Cyberax (✭ supporter ✭, #52523) [Link]

How about Postfix or something like Tomcat or Jetty?

And I still can't get why my BIND hangs during shutdown (something to do with RNDC which I just don't have energy to debug).

systemd & the tightly couple core band vs a world of many inits

Posted Apr 28, 2012 23:52 UTC (Sat) by speedster1 (subscriber, #8143) [Link]

Never dealt with any of those, so maybe my running services are just better behaved and don't require twisted setup scripts... exim, dovecot, lighttpd, dhcp, dnsmasq, apache, mysql, nfs, upnp, vnc, mdadm etc

systemd & the tightly couple core band vs a world of many inits

Posted Apr 29, 2012 1:21 UTC (Sun) by jimparis (subscriber, #38647) [Link]

> And I still can't get why my BIND hangs during shutdown

If you're running Debian or Ubuntu: http://bugs.debian.org/570852

systemd & the tightly couple core band vs a world of many inits

Posted Apr 29, 2012 10:10 UTC (Sun) by anselm (subscriber, #2796) [Link]

I've dealt with plenty of classic init scripts on RHEL/CentOS, debian, and embedded systems and none of those seemed hard to customize when needed.

They are still 90% boiler plate, and distribution-specific boiler plate at that. If systemd did nothing except replacing that boiler plate with small distribution-independent configuration files (which is a minuscule part of what it actually does) it would still be a net win.

A bit of boilerplate is not always a big deal, but systemd respawn is nice

Posted Apr 29, 2012 18:29 UTC (Sun) by speedster1 (subscriber, #8143) [Link]

If you mean net win on the large scale, for developers of large distros, I'd agree with you. However there are other niches where systemd would not win on that basis.

Boilerplate code is not automatically terrible in all situations. For projects that have lots of churn, it can be a hiding place for bugs unless there are good automated tools to ensure every instance gets updated. If the boilerplate is horribly ugly, it can make your eyes hurt from having to look at it so often.

However the init scripts on my embedded projects don't fit that category, nor RHEL init scripts for a non-embedded project, nor the init scripts on my debian server, nor the init scripts on my gentoo development station. The scripts are normal-looking shell scripts which are all the more easily understood because they follow a common pattern and well-known purpose. For a small number of already well-behaved systems (not servers that must run somewhat ill-behaved services), switching from shell scripts to denser config files may not offer any benefit.

BUT, for my embedded projects, systemd does currently offer one much more compelling feature than replacing some small easily-understood shell scripts with even smaller systemd configs: finer respawn control. Busybox init is very limited in that respect. Ability to start and stop a service (init.d), OR ability to respawn (inittab). No control over respawn timing either. In the one current project where we are able to give systemd a spin, configurable respawn policy is the actual practical advantage over sysv-style init for ; we don't have the sorts of daemons that really call for cgroup features otherwise (e.g. misbehaving child processes that don't get cleaned up properly otherwise).

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds