nixos/network-interfaces-scripted: always run systemctl of the currently running systemd

This commit is contained in:
Florian Klink 2020-05-21 10:33:51 +02:00
parent 062302e006
commit ad26d7c044

View File

@ -327,7 +327,7 @@ let
# if `libvirtd.service` is not running, do not use `virsh` which would try activate it via 'libvirtd.socket' and thus start it out-of-order.
# `libvirtd.service` will set up bridge interfaces when it will start normally.
#
if ${pkgs.systemd}/bin/systemctl --quiet is-active 'libvirtd.service'; then
if /run/current-system/systemd/bin/systemctl --quiet is-active 'libvirtd.service'; then
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" | \