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:

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.

The conversion deals with several quirks of systemd:

Extensions to the systemd unit specification

There are several extensions to the systemd unit specification provided by the conversion process, to allow a unit file to specify things that systemd doesn't have but that service bundles have: