Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for June 20, 2013
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Makes sense. 90% of initscripts are boilerplate anyway.
Upstart and systemd are doing a great job to excise that bit of cancer from our bootup.
Can you honestly say the following upstart job isn't easier to understand than a full init shellscript? The equivalent systemd unit is one line shorter, too.
sudo tee /etc/init/nginx.conf <<-\EOA
# nginx - starts the nginx webserver
start on (net-device-up and local-filesystems)
stop on runlevel 
pre-start exec /usr/sbin/nginx -t
Systemd and ConsoleKit
Posted May 6, 2011 11:35 UTC (Fri) by aniou (guest, #74708)
Posted May 6, 2011 15:15 UTC (Fri) by nybble41 (subscriber, #55106)
Posted May 6, 2011 16:09 UTC (Fri) by aniou (guest, #74708)
Posted May 6, 2011 18:55 UTC (Fri) by anselm (subscriber, #2796)
Doesn't sound like a feature that would be impossible to add.
Posted May 7, 2011 9:31 UTC (Sat) by mezcalero (subscriber, #45103)
That all said we do give you the option to use SIGHUP for reloading (in in a few cases that's even OK to use, since there is no effective difference between async/sync reloading for the particular case) simply by invoking the /bin/kill command from ExecReload=.
But yeah, in general think twice: the traditional SIGHUP reloading of Unix daemons is problematic.
Posted May 9, 2011 8:21 UTC (Mon) by marcH (subscriber, #57642)
Having suffered a lot from it in various cases I think I understand the "fire-and-forget" programming problem with SIGHUP reloads. BTW, even some "start" commands are asynchronous by default. This is an incredible bad idea: it is trivial to make a synchronous command asynchronous (&) as a speed hack, while extremely hard to check for completion of a dependency that escapes by making itself asynchronous.
However asynchronous commands are usually not a problem for end-users. Human end-users are quite different from programs: they more often than not know how much time the command will take, are able to poll intelligently, know how to verify whether the service has actually been reloaded,... so removing the whole feature just because it cannot be made synchronous would sound a bit harsh.
I do not know about systemd (yet...), but other init systems could probably make more difference between their programming versus user interfaces. Something like: "SIGUP commands are only for end-users, do not use in scripts". I have no idea how this could be achieved though.
Posted May 9, 2011 11:44 UTC (Mon) by vonbrand (subscriber, #4458)
But you said it yourself: Just "... &" the regular command.
Posted May 9, 2011 13:41 UTC (Mon) by marcH (subscriber, #57642)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds