On Sat, Feb 25, 2012 at 11:36:04AM -0800, Steve Langasek wrote: > On Thu, Feb 23, 2012 at 08:08:18PM +0000, Tzafrir Cohen wrote: > > On Thu, Feb 23, 2012 at 07:24:20AM +0100, Tollef Fog Heen wrote: > > > ]] Tzafrir Cohen > > > > > In sysv init scripts the daemon forks into the background. In upstrart > > > > and systemd it doesn't have to (or shouldn't). (not) forking requires a > > > > different command-line argument, normally. This leads to odd beasts such > > > > as safe_mysqld. > > > > You can just use the --background switch to start-stop-daemon with > > > sysvinit scripts. > > > It's still a different command. And anyway, very often the daemon itself > > needs to handle the PID files, which means that I can't use that. > > > But more importantly, start-stop-daemon only starts and stops the daemon > > once. It's not a daemon monitor. Would there be any objection if I > > replaced init.d scripts in some of my packages with runit configs (as > > does the git daemon)? > > The git daemon offers alternatives: one package with a sysvinit config, and > one with a runit config. If that's what you have in mind, I don't think > anyone would object. But making your server package use runit exclusively > would certainly bring objections. If we actually believed runit was a > viable replacement for sysvinit, we could have done *that* transition well > before either upstart or systemd even existed; but we didn't, and I think > imposing runit on users of your package while Policy 9.3.2 says you should > be using sysvinit would be frowned upon. > > I for one would welcome a policy discussion (i.e., on debian-policy) of how > runit fits into the larger question of preserving coherence of the Debian > system while allowing maintainers to take advantage of (or experiment with) > new innovations.
Thanks for your reply. A few words about my motivation: Package Asterisk, ships with a standard init.d script. But upstream prefers to use a wrapper shell script called "safe_asterisk" (somewhat like safe_mysqld). Currently the Debian init.d script will allow you to run either (settings in /etc/defaults/asterisk . Naturally a monitoring script written in shell is not idea, and it can go wrong. The package includes example upstart and systemd configs, but the user will have to install those manually. I don't really like the potentially-racy wrapper script, but then again, I can't provide a better alternative so far. -- Tzafrir Cohen | tzaf...@jabber.org | VIM is http://tzafrir.org.il | | a Mutt's tzaf...@cohens.org.il | | best tzaf...@debian.org | | friend -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120225202917.gk9...@pear.tzafrir.org.il