From e123631ed3e9466147dce40a376a8b9355cc00c5 Mon Sep 17 00:00:00 2001 From: Volth Date: Mon, 21 Aug 2017 16:47:59 +0000 Subject: [PATCH] add separator in case if a VM connected to more than 1 bridge --- nixos/modules/tasks/network-interfaces-scripted.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index 0cfb8d525e33..0560176bf579 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -256,7 +256,7 @@ let for uri in qemu:///system lxc:///; do for dom in $(${pkgs.libvirt}/bin/virsh -c $uri list --name); do ${pkgs.libvirt}/bin/virsh -c $uri dumpxml "$dom" | \ - ${pkgs.xmlstarlet}/bin/xmlstarlet sel -t -m "//domain/devices/interface[@type='bridge'][target/@dev][source/@bridge]" -v "concat('ip link set ',target/@dev,' master ',source/@bridge)" | \ + ${pkgs.xmlstarlet}/bin/xmlstarlet sel -t -m "//domain/devices/interface[@type='bridge'][source/@bridge='${n}'][target/@dev]" -v "concat('ip link set ',target/@dev,' master ',source/@bridge,';')" | \ ${pkgs.bash}/bin/bash done done