diff options
Diffstat (limited to 'qemu')
-rwxr-xr-x | qemu | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -49,9 +49,11 @@ get_address_family(){ [ -z "${1##*:*}" ] && echo ipv6 || echo ipv4; } get_config(){ local configfile="$1" - local ns="https://2e8.dk/libvirt-routed-subnet" + local tag = 'routed-subnet' + local ns='https://2e8.dk/libvirt-routed-subnet' + local query = "//*[local-name()='$tag' and namespace-uri()='$ns']" fullxml="$(cat "$configfile")" - routingxml="$(xpath "//*[local-name()='routed-subnet' and namespace-uri()='$ns']" "$fullxml")" + routingxml="$(xpath "$query" "$fullxml")" } get_device(){ |