Cheers. I's setting up a sort of VPN gateway/endpoint - an unprivileged LXC container (running under Proxmox VE 7) based on Ubuntu 20.04, with nordvpn and dante-server installed. The latter is set up with "nordlynx" interface as the only external interface. The interface is created only after nordvpn actually connects to a server. Because of this, the dante server must be started after the interface is created, otherwise it just exits with an error.
In the old ways I would achieve this by adding post-up /etc/init.d/danted start
to the nordlynx interface stanza in /etc/network/interfaces
. That is gone now and I'd like to do it properly under systemd.
My understanding is that this should be trivial on bare metal/VM installation, where systemd has .netdev
and .device
units available, and I could achieve the goal by just setting After=<inderface unit>.device
in the danted.service unit. But containers don't have device units. The docs for device unit even says (emphasis mine):
Note that if systemd-udevd.service is not running, no device units will be available (for example in a typical container).
So how should I implement post-up actions under these conditions? Currently, systemd-udevd is not running in the container because /sys is not writable.