docs/INCOMPABILITIES: format text

This commit is contained in:
hulkoba 2024-02-26 14:36:28 +01:00
parent abbfc39aaa
commit 4601153cbe
No known key found for this signature in database
GPG key ID: ACB6C4A3A4F2BE2F

View file

@ -7,7 +7,11 @@ SPDX-License-Identifier: LGPL-2.1-or-later
# Compatibility with SysV
systemd provides a fair degree of compatibility with the behavior exposed by the SysV init system as implemented by many distributions. Compatibility is provided both for the user experience and the SysV scripting APIs. However, there are some areas where compatibility is limited due to technical reasons or design decisions of systemd and the distributions. All of the following applies to SysV init scripts handled by systemd, however a number of them matter only on specific distributions. Many of the incompatibilities are specific to distribution-specific extensions of LSB/SysV init.
systemd provides a fair degree of compatibility with the behavior exposed by the SysV init system as implemented by many distributions.
Compatibility is provided both for the user experience and the SysV scripting APIs.
However, there are some areas where compatibility is limited due to technical reasons or design decisions of systemd and the distributions.
All of the following applies to SysV init scripts handled by systemd, however a number of them matter only on specific distributions.
Many of the incompatibilities are specific to distribution-specific extensions of LSB/SysV init.
* If your distribution removes SysV init scripts in favor of systemd unit files typing "/etc/init.d/foobar start" to start a service will not work, since the script will not be available. Use the more correct "/sbin/service foobar start" instead, and your command will be forwarded to systemd. Note that invoking the init script directly has always been suboptimal since too much of the caller's execution context (environment block, umask, resource limits, audit trails, ...) ended up being inherited by the service, and invocation via "/sbin/service" used to clean this up at least partially. Invocation via /sbin/service works on both SysV and systemd systems. Also, LSB only standardizes invocation via "/sbin/service" anyway. (Note that some distributions ship both systemd unit files and SysV scripts for the services. For these invoking the init scripts will work as expected and the request be forwarded to systemd in any case.)
* LSB header dependency information matters. The SysV implementations on many distributions did not use the dependency information encoded in LSB init script headers, or used them only in very limited ways. Due to that they are often incorrect or incomplete. systemd however fully interprets these headers and follows them closely at runtime (and not at installation time like some implementations).