Importing systemd unit files

The native mechanism for this system is the service bundle. One can, however, import systemd unit files. The system-control convert-systemd-units command takes systemd unit files and converts them to a service bundle directory. This conversion program allows software packagers to quickly construct a service bundle if they already have systemd unit files for a service. (It also allows system administrators to do this in the case that software packagers have not.)

What can be imported

Five kinds of unit can be converted:

There are a few restrictions (summarized here, for details, see the convert-systemd-units manual):

These cover a large number of unit files, in practice.

What import does

convert-systemd-units breaks down the unit files and builds run, start, and service scripts that use the various utility programs to set up a service's run-time environment in the way specified by the unit files. (This is only a subset of what a run script can actually do.) A User= directive becomes a setuidgid command, for example.

Import can operate in either "ideal" mode or "quirks" mode. Quirks mode deals with several quirks of systemd and is the mode to use when taking existing unit files supplied with other packages. See the convert-systemd-units manual for details.