I am in the process of updating/upgrading a package from an init.d service
to a Systemd service. Are there any recommended guidelines for this process?
Looking through some current packages I see that a lot of them have both an init script and a Systemd service in their debian folder. Do dh_installsystemd and dh_installinit handle this smoothly by default if both files exist? When upgrading the package on a machine will it stop the init service and start the Systemd service?
One thing I'd say is: please keep the init script in your package, so
that people using inits other than systemd can continue to use it.
On Mon, 24 Apr 2023 15:48:02 +0100, Matthew Vernon
<matthew@debian.org> wrote:
One thing I'd say is: please keep the init script in your package,
so that people using inits other than systemd can continue to use
it.
I am not sure whether it is doing non-systemd users a favor to keep a probably outdated, bitrotting and untested init script in the
canonical place.
My gut feeling is that it might be better to ship the old init script
in /usr/share/doc/package/examples unless the package maintainer is reasonably sure that the init script will actually work.
OTOH it is an un-favor to move or remove it...
It is better to keep the init script in place.
I am not sure whether it is doing non-systemd users a favor to keep a probably outdated, bitrotting and untested init script in the
canonical place. My gut feeling is that it might be better to ship the
old init script in /usr/share/doc/package/examples unless the package maintainer is reasonably sure that the init script will actually work.
On Wed, 2023-04-26 at 22:44 +0300, Boian Bonev wrote:
OTOH it is an un-favor to move or remove it...
It is better to keep the init script in place.
Another option is the orphan-sysvinit-scripts package:
On Wed, Apr 26, 2023 at 04:25:19PM +0200, Marc Haber wrote:
I am not sure whether it is doing non-systemd users a favor to keep a
probably outdated, bitrotting and untested init script in the
canonical place. My gut feeling is that it might be better to ship the
old init script in /usr/share/doc/package/examples unless the package
maintainer is reasonably sure that the init script will actually work.
No, that is worse, because if an updated init script is shipped as an
example only, I will not even get a notification that I might want to
change my installed init script.
On Thu, 27 Apr 2023 08:20:34 +0200, Simon Richter <sjr@debian.org>
wrote:
On Wed, Apr 26, 2023 at 04:25:19PM +0200, Marc Haber wrote:
I am not sure whether it is doing non-systemd users a favor to keep a
probably outdated, bitrotting and untested init script in the
canonical place. My gut feeling is that it might be better to ship the
old init script in /usr/share/doc/package/examples unless the package
maintainer is reasonably sure that the init script will actually work.
No, that is worse, because if an updated init script is shipped as an >example only, I will not even get a notification that I might want to >change my installed init script.
You have a point here. Maybe it would be a good idea to have a
standardized function in /lib/lsb/init-functions that emits a warning
that the package maintainer has changed the mechanism to invoke the
daemon and that the init script might need additional work, so that a
lazy maintainer like me might just call that function to give the
local admin a heads-up.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 488 |
Nodes: | 16 (2 / 14) |
Uptime: | 05:47:24 |
Calls: | 9,663 |
Calls today: | 5 |
Files: | 13,711 |
Messages: | 6,166,933 |
Posted today: | 2 |