On Monday, October 24, 2016 11:43:58 PM you wrote: > On Mon, Oct 24, 2016 at 02:03:57PM -0400, Scott Kitterman wrote: > > Unfortunately, systemd doesn't support a broad enough set of options to > > properly support /etc/default with a static service file. It only changes > > the file if the administrator has changed the /etc/default file, so I > > think this is OK. > > The proper way to dynamically generate a systemd unit is a generator: > > https://www.freedesktop.org/software/systemd/man/systemd.generator.html > > However, if every Debian package implemented its own generator script > to support full customization via the sysvinit default files, rather > than suggesting override files in /etc/systemd/system/<service>.d/, > we would converge to the same mess as with sysvinit scripts before. > > I will follow up asking the Debian systemd maintainers for advice, > since the question of default files is relevant for many packages.
Generating it in the postinst is what I plan on doing, although I don't think the systemd facilities for doing so are sufficient. I wouldn't mind finding out I'm wrong. As long as Debian is supporting both sysvinit and systemd, I don't think the package should change behavior when the init system is changed. That means reading /etc/default, so I'll be interested to see what you find out. Scott K