From: Ian Kelling Date: Fri, 28 Nov 2025 10:06:05 +0000 (-0500) Subject: move func from brc2 to brc to get it in an ssh X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=67f358c12ce39739ab9976576eaa10650e7b1eae;p=distro-setup move func from brc2 to brc to get it in an ssh --- diff --git a/brc b/brc index d583abd..3043c2e 100644 --- a/brc +++ b/brc @@ -4634,6 +4634,21 @@ dtsort() { echo $(date +%j)---$day_mins } +wgkey() { + local umask_orig name + if (( $# != 1 )); then + e expected 1 arg >&2 + return 1 + fi + name=$1 + umask_orig=$(umask) + umask 0077 + wg genkey | tee $name-priv.key | wg pubkey > $name-pub.key + umask $umask_orig +} + + + # * stuff that makes sense to be at the end # note, if we unset IFS, that will mess up completion scripts which diff --git a/brc2 b/brc2 index 06490fc..8878114 100644 --- a/brc2 +++ b/brc2 @@ -2088,18 +2088,7 @@ kff() { popd } -wgkey() { - local umask_orig name - if (( $# != 1 )); then - e expected 1 arg >&2 - return 1 - fi - name=$1 - umask_orig=$(umask) - umask 0077 - wg genkey | tee $name-priv.key | wg pubkey > $name-pub.key - umask $umask_orig -} + host-info-all() { hiup