X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=3edbae0f26a47871cf1e0d733f570d0b935f8995;hb=858993fb6c3e9351988b193e6c296e6ea7862501;hp=de12005348a0efa2fad4e0e1f2952902cb4d912d;hpb=ef3bbffe6d2a08ebd735ba4f09c7bd0fbea585a0;p=distro-setup diff --git a/brc2 b/brc2 index de12005..3edbae0 100644 --- a/brc2 +++ b/brc2 @@ -172,7 +172,7 @@ slemacs() { sle() { # sl emacs local f=/home/iank/.emacs.d/init.el - sl --sl-test-cmd ". /etc/os-release ; printf %s \${VERSION//[^a-zA-Z0-9]/}; test -e $f && stat -c%Y $f" --sl-test-hook slemacs "$@" + sl --sl-test-cmd "sed -rn '/^VERSION=/{s/^.*=//;s/[^[:alnum:]]//gp}' /etc/os-release; test -e $f && stat -c%Y $f" --sl-test-hook slemacs "$@" } ccomp ssh sle @@ -2639,7 +2639,7 @@ wgkey() { host-info-all() { host-info-update bindpushb8 - ssh li.b8.nz conflink + ssh iank@li.b8.nz conflink wrt-setup } @@ -2687,12 +2687,15 @@ 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 - host_ips[$host]=$ip - host_macs[$host]=$mac + if [[ $mac ]]; then + host_macs[$host]=$mac + fi + done