Score:0

Replacing ifupdown's post-up in Ubuntu 20.04 container?

in flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.