Start virtual network only if available

This commit is contained in:
Manuel Thalmann 2024-09-26 17:05:48 +02:00
parent 1b26faf5d3
commit f2e10df144

View file

@ -4,11 +4,12 @@ begin
source "$dir/../../Scripts/software.fish"
function configureSW
sudo virsh net-autostart default
begin
sudo virsh net-info default | grep "^Active:\s*yes\$" > /dev/null
end || sudo virsh net-start default
if not sudo virsh net-info default | grep "^Active:\s*yes\$" > /dev/null
sudo virsh net-start default || true
end
and sudo virsh net-autostart default
or true
end
function userConfig -a name