[systemd-devel] Placing systemd unit files on a non-root partition

Henrik Grindal Bakken hgb at ifi.uio.no
Wed Nov 8 12:37:12 UTC 2017


magnus at minimum.se writes:

> 3. The third option I see is to use generators. I have limited experience
> with generators, but it seems to be a mechanism to dynamically add units
> as the system boots. I could implement this by storing application
> manifests on the application partition and let a generator generate a unit
> for each application manifest found. The obvious downside would be that
> I'd have to invent some kind of manifest file format that describes how to
> start my program, just so that it can converted into a unit file by a
> generator. I consider service unit files perfectly capable of describing
> such things.

You could simply use a generator to create symlinks in
/run/systemd/generator/foo.target.wants to the files in
/mountpoint/lib/systemd/system.

That, or mirror /mountpoint/lib/systemd/system into /run/systemd/generator.

-- 
Henrik Grindal Bakken <hgb at ifi.uio.no>
PGP ID: 8D436E52
Fingerprint: 131D 9590 F0CF 47EF 7963  02AF 9236 D25A 8D43 6E52



More information about the systemd-devel mailing list