From: Ian Kelling Date: Sun, 28 Apr 2024 17:59:33 +0000 (-0400) Subject: host info updates X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=858993fb6c3e9351988b193e6c296e6ea7862501;p=distro-setup host info updates --- 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 <