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:

netif@eth0.service - Interface Setup for eth0
          Loaded: loaded (/etc/systemd/system/netif@.service)
          Active: active (running) since Fri, 04 Mar 2011 22:28:03
+0300; 2min 41s ago
         Process: 1714 ExecStart=/sbin/ifup %I daemon (code=exited,
status=0/SUCCESS)
        Main PID: 1809 (ifplugd)
          CGroup: name=systemd:/system/netif@.service/eth0
                  └ 1809 /sbin/ifplugd -I -b -i eth0

netif@wlan0.service - Interface Setup for wlan0
          Loaded: loaded (/etc/systemd/system/netif@.service)
          Active: active (running) since Fri, 04 Mar 2011 22:28:04
+0300; 2min 40s ago
         Process: 1713 ExecStart=/sbin/ifup %I daemon (code=exited,
status=0/SUCCESS)
          CGroup: name=systemd:/system/netif@.service/wlan0
                  ├ 1931 /usr/sbin/wpa_supplicant -B -i wlan0 -c /etc/wpa_s...
                  ├ 1933 /sbin/ifplugd -I -b -i wlan0
                  └ 2186 dhclient -1 -q -lf /var/lib/dhcp/dhclient-wlan0.le...

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.

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 ...

Attachment: netif@.service
Description: Binary data

Attachment: net-generator.sh
Description: Bourne shell script

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to