On Mon, May 16, 2022 at 04:28:41PM +0100, Julian Gilbey wrote:
> [...]
> Yes, it does, but having a look at /usr/bin/lxc-update-config, I see
> that the "0" in this is not necessarily always correct; it could be
> any number. So perhaps something more like:
>
> local bridge_interface=$(awk '/lxc\.net(work|\.[0-9]+)\.link/ {print($3)}'
> /etc/lxc/default.conf)
>
> would be better?
And it dawns on my that this will have problems if there's more than
one lxc.net.\d+.link present. So maybe the following is better:
local bridge_interface=$(awk '/lxc\.net(work|\.[0-9]+)\.link/ {print($3)}'
/etc/lxc/default.conf | head -n 1)
Best wishes,
Julian