Re: [systemd-devel] systemd-networkd: reload network unit from a non-root partition using a mount unit

2014-11-27 Thread Matthias Klein


Am 26.11.2014 um 21:52 schrieb Tom Gundersen:


This sort of scheme (mounting partitions with extra config files after
the daemons have started) is not really something we support. We would
rather recommend you mount everything you need for your base system
(i.e., all of /etc and /usr, but not necessarily /var, /home, ...)
from your initrd so that it is all there once your real userspace is
started.

That said, it _should_ just work to simply restart the relevant
services (i.e., systemd-networkd and wpa_supplicant), or better you,
just order them After= the relevant mount units (the latter will only
work if you don't need any networking before this point of course).

Please note that 'systemctl daemon-reload' only reloads the
configuration of PID1 itself, and not of the individual daemons, so
that is probably what tripped you up.

Thanks a lot for these tips!

Ordering networkd with After= in a .conf file works fine.

Best regards,
Matthias

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


[systemd-devel] systemd-networkd: reload network unit from a non-root partition using a mount unit

2014-11-26 Thread Matthias Klein

Hello,

I try to configure systemd 216 to boot an embedded board where the 
network configuration stays on a different partition.

The boot should look like:
- mount a partition called config using a mount unit
- now systemd should reload its configuration to get two network units 
which resides on the config partition [the path /etc/systemd/network/ 
is linked to that partition]
- on the root file system I have a wpa_supplicant@ unit for the wlan0 
device [the wpa_supplicant.conf file for that device also resides on the 
config partition]



My problem is that I can't get systemd to succesfully reload its 
configuration for my network units after mounting the config partition.
I tried to to add a ExecStart systemctl daemon-reload inside the 
wpa_supplicant rule.


If I have the network unit in my (read-only) root filesystem everything 
works fine. (No reloading is needed here ...)



Is it possible to place the network untis onto a partition which is 
mounted by systemd?



Best regards,
Matthias

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