X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=ddb6e79b9bfb496557c7b36f03a7eacec5e9f211;hb=8796be333861fd2edc6c8b9b4c22307c11fce409;hp=a29651bb6589bc0a38446415d3b06212cdec1791;hpb=cb002f1dc386fdf42b30133351b90e6d2a662174;p=distro-setup diff --git a/brc b/brc index a29651b..ddb6e79 100644 --- a/brc +++ b/brc @@ -15,8 +15,8 @@ else # bleh shellcheck can't handle disabling in an elif, so nesting this if. # shellcheck disable=SC2154 # set in .bashrc if [[ -s $bashrc_dir/err ]]; then - # shellcheck source=/a/bin/errhandle/err - source $bashrc_dir/err + # shellcheck source=/a/bin/errhandle/err + source $bashrc_dir/err fi fi @@ -673,8 +673,20 @@ khcopy() { # ya, hacky hardcoded hostnames in 2023. we could do better hssh-update() { - local -a failed_hosts - for host in kd x3.office.fsf.org syw; do + local -a failed_hosts hosts + case $HOSTNAME in + sy|kd) + hosts=( + kd x3.office.fsf.org syw + ) + ;; + x3) + hosts=( + b8.nz sywg.b8.nz + ) + ;; + esac + for host in ${hosts[@]}; do e $host if ! scp /b/fai/fai/config/files/usr/local/bin/hssh/IANK root@$host:/usr/local/bin/hssh; then failed_hosts+=($host) @@ -1578,14 +1590,14 @@ pst() { pstree -apnA } -jtail() { - journalctl -n 10000 -f "$@" -} -jr() { journalctl "$@" ; } -jrf() { journalctl -f "$@" ; } +jr() { journalctl -e -n100000 "$@" ; } +jrf() { journalctl -n1000 -f "$@" ; } jru() { - journalctl -u exim4 _SYSTEMD_INVOCATION_ID="$(systemctl show -p InvocationID --value $1)" + # the invocation id is "assigned each time the unit changes from an inactive + # state into an activating or active state" man systemd.exec + journalctl -e --no-tail -u exim4 _SYSTEMD_INVOCATION_ID="$(systemctl show -p InvocationID --value $1)" } +ccomp journalctl jr jrf jru @@ -2103,8 +2115,6 @@ sgu() { sk() { - - # disable a warning with: # shellcheck disable=SC2206 # reasoning @@ -2116,6 +2126,14 @@ sk() { shellcheck -W 999 -x -e $quotes,$others "$@" || return $? } +skgit() { + local f + for f in $(i s | awk '$1 == "modified:" {print $2}'); do + if [[ $(head -n1 "$f") == '#!/bin/bash'* ]]; then + sk $f + fi + done +} # sl: ssh, but firsh rsync our bashrc and related files to a special # directory on the remote host if needed.