diff options
author | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2024-12-07 23:32:25 +0000 |
---|---|---|
committer | Asbjørn Sloth Tønnesen <ast@2e8.dk> | 2024-12-07 23:36:43 +0000 |
commit | 29d431a36f3be34e81775c688ca71db297aa8c4e (patch) | |
tree | 3fd0110389797c5395c67f6f9482d2253a7475cf | |
parent | b2fe8986a66a9a130e41b8b9087458ab3e80816a (diff) | |
download | libvirt-routed-subnet-29d431a36f3be34e81775c688ca71db297aa8c4e.tar.gz libvirt-routed-subnet-29d431a36f3be34e81775c688ca71db297aa8c4e.tar.xz libvirt-routed-subnet-29d431a36f3be34e81775c688ca71db297aa8c4e.zip |
cleanup get_config()
No functional change intended.
-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(){ |