sync-containers3: bind to bridge after startup
This commit is contained in:
parent
015ef28416
commit
334378bc57
@ -246,9 +246,11 @@ in {
|
|||||||
}; }
|
}; }
|
||||||
{ "container@${ctr.name}" = lib.mkIf ctr.runContainer {
|
{ "container@${ctr.name}" = lib.mkIf ctr.runContainer {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStop = pkgs.writers.writeDash "remove_interface" ''
|
ExecStartPost = [
|
||||||
${pkgs.iproute2}/bin/ip link del vb-${ctr.name}
|
(pkgs.writers.writeDash "bind-to-bridge" ''
|
||||||
'';
|
${pkgs.iproute2}/bin/ip link set "vb-$INSTANCE" master ctr0
|
||||||
|
'')
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}; }
|
}; }
|
||||||
]) (lib.attrValues cfg.containers)));
|
]) (lib.attrValues cfg.containers)));
|
||||||
|
Loading…
Reference in New Issue
Block a user