From 858993fb6c3e9351988b193e6c296e6ea7862501 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 28 Apr 2024 13:59:33 -0400 Subject: [PATCH] host info updates --- brc2 | 21 +++++++++++++------ easiest-to-type-numbers | 2 +- .../etc/openvpn/client-config-hole/bb8 | 1 - .../etc/openvpn/client-config-hole/frodo | 1 - .../etc/openvpn/client-config-hole/x2 | 2 +- .../systemd/system/openvpn-client-tr@.service | 4 ++-- 6 files changed, 19 insertions(+), 12 deletions(-) delete mode 100644 machine_specific/li/filesystem/etc/openvpn/client-config-hole/bb8 delete mode 100644 machine_specific/li/filesystem/etc/openvpn/client-config-hole/frodo diff --git a/brc2 b/brc2 index 05de0a3..3edbae0 100644 --- a/brc2 +++ b/brc2 @@ -2650,7 +2650,7 @@ host-info-all() { host-info-update() { local -A vpn_ips host_ips host_macs nonvpn_ips all_ips - local -a root_hosts nonroot_hosts host_usbs + local -a root_hosts nonroot_hosts # the hosts with no mac root_hosts=( bk je li b8.nz ) @@ -2687,6 +2687,7 @@ host-info-update() { # hosts is that it is for the User part, the IdentityFile part is # redundant to *.b8.nz. Also note ${host}i, we only setup those for vpn hosts, but there is no harm in overspecifying here. root_hosts+=($host ${host}i $host.b8.nz ${host}i.b8.nz) + root_hosts_a[$host]=t # a for associative array else nonroot_hosts+=($host ${host}i) fi @@ -2756,7 +2757,7 @@ EOF # shellcheck disable=SC2016 # shellcheck doesnt know this is sed sedi '/edits below here are made automatically/,$d' /p/c/machine_specific/li/filesystem/etc/wireguard/wgmail.conf for host in ${!vpn_ips[@]}; do - if [[ ${root_ips[$host]} ]]; then + if [[ ${root_hosts_a[$host]} ]]; then # root machines dont actually need vpn, but # the classification still helps with other # configurations. @@ -2764,7 +2765,7 @@ EOF fi ipsuf=${vpn_ips[$host]} wghole $host $ipsuf - sd /b/ds/machine_specific/li/filesystem/etc/openvpn/client-config-hole/$host <