verify against permaddrs as well
This commit is contained in:
@@ -38,7 +38,7 @@ in {
|
||||
enable = config.vacu.verifySystem.expectedMac != null;
|
||||
script = ''
|
||||
expected=${lib.toUpper config.vacu.verifySystem.expectedMac}
|
||||
declare -a actual=($(${pkgs.iproute2}/bin/ip -j link | ${pkgs.jq}/bin/jq 'map(.address | ascii_upcase) | join("\n")' -r))
|
||||
declare -a actual=($(${pkgs.iproute2}/bin/ip -j link | ${pkgs.jq}/bin/jq 'map([.permaddr, .address] | map(strings | ascii_upcase)) | flatten | join("\n")' -r))
|
||||
for ifMac in "''${actual[@]}"; do
|
||||
if [[ "$ifMac" == "$expected" ]]; then
|
||||
# all is well
|
||||
|
Reference in New Issue
Block a user