[systemd-devel] Dynamic generators (after systemd start)

Lennart Poettering lennart at poettering.net
Sun Mar 6 16:51:29 PST 2011

On Fri, 04.03.11 22:37, Andrey Borzenkov (arvidjaar at gmail.com) wrote:

> I am playing with per-interface auto-generated units (for the case
> without NetworkManager :) ) and so far it looks quite promising -
> using trivial unit file and even more trivial generator I
> automatically get interfaces up at the correct time:

I am not sure I am such a big fan of reimplementing NetworkManager...

> Now, the question is - what to do with hot-pluggable interfaces? Can I
> generate unit after systemd has been started and inform it? I think,
> this is becoming quite useful now.

Well, sure. "systemctl daemon-reload" will drop the generator-generated
units files and rerun the generators.

> For reference, current proof of concept attached. We are using mostly
> the same ifcfg files, so may be at least some design can be shared
> with Fedora ...

I'd probably recommend doing this the other way round. Write some tiny
code that can be executed from an udev rule, and then use
SYSTEMD_WANTS=netif at ... to hook it in?


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list