From: Ian Kelling Date: Mon, 5 Aug 2024 01:00:45 +0000 (-0400) Subject: mainly bug fix for wghole X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=59d478f142495d81a65a67a6418117fae6fd5e0f;p=distro-setup mainly bug fix for wghole --- diff --git a/brc2 b/brc2 index 09614bd..d06685f 100644 --- a/brc2 +++ b/brc2 @@ -1972,7 +1972,7 @@ chro() { else cd / cmd="schroot -c bookworm chromium" - CHROMIUM_FLAGS='--enable-remote-extensions' $cmd & r + CHROMIUM_FLAGS='--enable-remote-extensions' $cmd "$@" & r fi } @@ -2553,7 +2553,7 @@ wgkey() { } host-info-all() { - host-info-update + hiup bindpushb8 # for wireguard configs @@ -2564,18 +2564,19 @@ host-info-all() { - ## for updating host info like ip, location, update /p/c/host-info and -## host_info below. the host_info array should probably be in its own -## file that gets sourced so that it can be more easily updated. +## /p/c/domain-info. # todo: this is so long that it becomes confusing, # try to split it up. # # To make some changes take effect, run host-info-all. -host-info-update() { +# hiup = host info update +hiup() { - local -A vpn_ips host_ips host_macs portfw_ips nonvpn_ips all_ips + # incomplete local vars list + local usb ip host mac opts + local -A vpn_ips host_ips host_macs portfw_ips nonvpn_ips all_ips root_hosts_a local -a root_hosts nonroot_hosts # the hosts with no mac @@ -2591,6 +2592,7 @@ host-info-update() { # opt parsing vpn=false root=false + usb=false for opt in $opts; do case $opt in user=root) @@ -2602,9 +2604,16 @@ host-info-update() { esac done + if [[ $mac == usb ]]; then + usb=true + fi + + all_ips[$host]=$ip - if $vpn; then + if $vpn || $usb; then portfw_ips[$host]=$ip + fi + if $vpn; then vpn_ips[$host]=$ip else nonvpn_ips[$host]=$ip @@ -2657,8 +2666,8 @@ EOF # hack to please emacs parser here_begin="cat < /dev/null -sudo apt-get update - - - -p update - - -# docker eats up a fair amount of cpu when doing nothing, so don't enable it unless -# we really need it. -pi-nostart docker-ce -# case $HOSTNAME in -# li|lj) sgo docker ;; -# *) -# # and docker is even more crap, it ignores that it shouldnt start -# ser stop docker -# ser disable docker -# ;; -# esac -### end docker install ####