From: Ian Kelling Date: Mon, 30 Mar 2026 10:44:16 +0000 (-0400) Subject: varioius improvements and fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=15afddda4bc97f1589f602900875952811ba9986;p=distro-setup varioius improvements and fixes --- diff --git a/brc b/brc index 91ded24..557fe50 100644 --- a/brc +++ b/brc @@ -1211,7 +1211,8 @@ chrbind() { chumount() { local d # dev/pts needed for pacman signature check - for d in dev/pts dev proc sys; do + if [[ -d dev/pts ]] && mountpoint -q dev/pts; then m s umount dev/pts; fi + for d in dev proc sys; do [[ -d $d ]] if mountpoint $d &>/dev/null; then m s umount $d @@ -1340,23 +1341,38 @@ despace() { } # df progress -# usage: dfp MOUNTPOINT [SECOND_INTERVAL] -# SECOND_INTERVAL defaults to 90 +# usage: dfp [-SECOND_INTERVAL] MOUNTPOINT... +# SECOND_INTERVAL defaults to 120 dfp() { - # mp = mountpoint - local a b mp interval - mp=$1 - interval=${2:-90} - if [[ ! $mp ]]; then - echo "dfp: error, missing 1st arg" >&2 + local f1 f2 f3 + local -i i mp_count M_diff interval=120 + local -a as bs mps M_s G_s + + if [[ $1 == -* ]]; then interval=${1#-}; shift; fi + if [[ ! $1 ]]; then + echo "dfp: error, missing mountpoint arg" >&2 return 1 fi + + mps=("$@") + mp_count=$# + + for (( i=0; i$x; pidwait -e -F $x; rm $x +} # * stuff that makes sense to be at the end diff --git a/brc2 b/brc2 index 3491ce7..07a4c7f 100644 --- a/brc2 +++ b/brc2 @@ -606,7 +606,7 @@ _iki-convert() { elif [[ ! -f $path && -e $path.mdwn ]]; then path=${path}.mdwn fi - j printf "%s\n" "$path" + jc printf "%s\n" "$path" ;; *) path=$(fp "$input") @@ -2473,6 +2473,8 @@ sudm() { # Returns 1 if we are not in the base mount namespace aka root mnt ns. mntns1-p() { + # fyi, another way to compare: + #s bash -c '[[ /proc/self/ns/mnt -ef /proc/1/ns/mnt ]]' s stat -Lc %i /proc/{1,self}/ns/mnt|uniq -d|read } # Like mntns1-p except with network ns. @@ -4769,9 +4771,14 @@ webp-anim-array() { # usage: pass encoded string on stdin -url-decode() { +urldecode() { python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()));" } +# usage: STRING_TO_ENCODE +urlenc() { + perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$1" +} + osimain() { i push && i push gh main @@ -5046,3 +5053,9 @@ maxpri-audio() { pids+=( $tmps ) maxpri ${pids[@]} } + +mnt-df() { + cd /mnt; + local mnts=$(for f in *; do if mountpoint -q $f; then e $f; fi; done) + df -h $mnts | awk '{printf "%8s %12s\n", $4,$NF}' | sort -hr +} diff --git a/conflink b/conflink index ca1deae..0a7e649 100755 --- a/conflink +++ b/conflink @@ -208,7 +208,7 @@ case $user in find_paths=(/p/c/filesystem /p/c/machine_specific/*/filesystem /p/c/user-specific) find-maybe -type d \! -name wireguard \! -path '*/moddata/*' \! -name moddata -exec chmod go+rX '{}' + - find_paths=(/p/c/filesystem/etc/ssh /p/c/machine_specific/*/filesystem/etc/ssh) + find_paths=(/p/c/filesystem/etc/{,hpn}ssh /p/c/machine_specific/*/filesystem/etc/ssh /p/c/machine_specific/*/filesystem/etc/hpnssh) find-maybe -type f \! -name '*key' -exec chmod go+rX '{}' + find_paths=(/p/c/machine_specific/*/filesystem/etc/apt) find-maybe -type f -exec chmod go+rX '{}' + diff --git a/distro-end b/distro-end index ffdaf3e..eb3826b 100755 --- a/distro-end +++ b/distro-end @@ -569,11 +569,11 @@ esac # Apr 12 21:25:28 sy kernel: BUG: Bad rss-counter state mm:000000003f3d390c type:MM_SHMEMPAGES val:1 # # Then many kernel freeze messages -# Apr 12 22:40:24 sy kernel: watchdog: BUG: soft lockup - CPU#6 stuck for 1467s! [system-status:2059] +# Apr 12 22:40:24 sy kernel: watchdog: BUG: soft lockup - CPU#6 stuck for 1467s! [systemstatus:2059] # Apr 12 22:40:24 sy kernel: Modules linked in: ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat nf_tables wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libcurve25519_generic libchacha ip6_udp_tunnel udp_tunnel ccm cmac algif_hash algif_skcipher af_alg snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic qrtr bnep binfmt_misc snd_sof_pci_intel_cnl intel_uncore_frequency intel_uncore_frequency_common snd_sof_intel_hda_common soundwire_intel snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof iwlmvm(OE) snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi intel_tcc_cooling soundwire_generic_allocation soundwire_bus x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_core mac80211(OE) cmdlinepart snd_compress ac97_bus kvm_intel snd_pcm_dmaengine spi_nor nls_iso8859_1 intel_rapl_msr mtd libarc4 snd_hda_intel uvcvideo snd_intel_dspcfg i915 videobuf2_vmalloc kvm snd_intel_sdw_acpi uvc # Apr 12 22:40:24 sy kernel: videobuf2_memops snd_hda_codec btusb videobuf2_v4l2 btrtl iwlwifi(OE) processor_thermal_device_pci_legacy processor_thermal_device irqbypass btintel processor_thermal_wt_hint snd_hda_core processor_thermal_rfim processor_thermal_rapl drm_buddy snd_hwdep btbcm rapl videodev btmtk videobuf2_common intel_rapl_common mc bluetooth snd_pcm ttm processor_thermal_wt_req cfg80211(OE) ecdh_generic intel_cstate processor_thermal_power_floor snd_timer ecc drm_display_helper snd i2c_i801 spi_intel_pci cec spi_intel iwlwifi_compat(OE) soundcore i2c_smbus processor_thermal_mbox int340x_thermal_zone rc_core intel_soc_dts_iosf intel_pch_thermal intel_pmc_core i2c_algo_bit intel_vsec pmt_telemetry intel_hid pmt_class sparse_keymap system76_acpi joydev input_leds mac_hid serio_raw sch_fq_codel nfsd usbhid parport_pc auth_rpcgss ppdev nfs_acl lp lockd parport grace efi_pstore sunrpc nfnetlink dmi_sysfs ip_tables x_tables autofs4 btrfs blake2b_generic dm_crypt raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor # Apr 12 22:40:24 sy kernel: async_tx xor raid6_pq libcrc32c raid1 raid0 hid_multitouch hid_generic 8250_dw rtsx_pci_sdmmc nvme nvme_core crct10dif_pclmul crc32_pclmul polyval_clmulni intel_lpss_pci polyval_generic ghash_clmulni_intel sha256_ssse3 rtsx_pci psmouse sha1_ssse3 intel_lpss nvme_auth xhci_pci i2c_hid_acpi idma64 xhci_pci_renesas i2c_hid hid video wmi pinctrl_cannonlake aesni_intel crypto_simd cryptd -# Apr 12 22:40:24 sy kernel: CPU: 6 PID: 2059 Comm: system-status Tainted: G D W OEL 6.8.0-57-generic #59trisquel35 +# Apr 12 22:40:24 sy kernel: CPU: 6 PID: 2059 Comm: systemstatus Tainted: G D W OEL 6.8.0-57-generic #59trisquel35 # Apr 12 22:40:24 sy kernel: Hardware name: System76 Lemur Pro/Lemur Pro, BIOS 2023-08-18_a8dd6c2 08/18/2023 # Apr 12 22:40:24 sy kernel: RIP: 0010:native_queued_spin_lock_slowpath+0x83/0x300 # Apr 12 22:40:24 sy kernel: Code: 00 00 f0 0f ba 2b 08 0f 92 c2 8b 03 0f b6 d2 c1 e2 08 30 e4 09 d0 3d ff 00 00 00 77 61 85 c0 74 10 0f b6 03 84 c0 74 09 f3 90 <0f> b6 03 84 c0 75 f7 b8 01 00 00 00 66 89 03 5b 41 5c 41 5d 41 5e @@ -1968,6 +1968,7 @@ After=wg-quick@wghole.service StartLimitIntervalSec=0 [Service] +ExecStartPre=/usr/local/bin/wghole-check Restart=always RestartSec=30 EOF @@ -1984,7 +1985,7 @@ esac # case $HOSTNAME in # sy|kd|so) # sudo install -m 0755 -o root -g root -t /usr/bin /a/opt/bitcoin-27.0/bin/* -# # Note: i leave it to system-status to start and stop bitcoin. +# # Note: i leave it to systemstatus to start and stop bitcoin. # # note: the bitcoin user & group are setup in fai # sudo usermod -a -G bitcoin iank # # todo: make bitcoin have a stable uid/gid @@ -2225,18 +2226,9 @@ case $codename_compat in esac -case $HOSTNAME in - $d_host) - sgo btrbkr{backup,2,3}.timer - ;; - *) - soff btrbkr{backup,2,3}.timer - s rm -f /etc/systemd/system/btrbkr* - ;; -esac +# todo: enable frodo specific backup timers here # misc -sgo system-status sgo hist-catcher # console font size diff --git a/filesystem/usr/local/bin/check-subvol-stale b/filesystem/usr/local/bin/check-subvol-stale index 3602056..cc2cf85 100755 --- a/filesystem/usr/local/bin/check-subvol-stale +++ b/filesystem/usr/local/bin/check-subvol-stale @@ -144,7 +144,7 @@ for d; do mapper-dev devx fi d devx=$devx - root_dir=$(sed -rn "s,^\s*$devx\s+(\S+).*\bsubvolid=[05]\b.*,\1,p" /etc/mtab /etc/fstab|head -n1) + root_dir=$(sed -rn "/[,[:space:]]subvol=/d;s,^\s*$devx\s+(\S+).*,\1,p" /etc/mtab /etc/fstab|head -n1) if [[ $root_dir ]]; then d root_dir=$root_dir break diff --git a/filesystem/usr/local/bin/i3-chat b/filesystem/usr/local/bin/i3-chat index a9a7c59..13034c5 100755 --- a/filesystem/usr/local/bin/i3-chat +++ b/filesystem/usr/local/bin/i3-chat @@ -21,10 +21,7 @@ # limitations under the License. i3-msg "workspace 4" -if ! pgrep "^prof$" >/dev/null; then - prof & -fi -# start emacs daemon for profanity if it doesnt exist. +# start emacs daemon for profanity/znc if it doesnt exist. id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^iznc ")).id') @@ -32,33 +29,29 @@ if [[ ! $id ]]; then emacsclient -s profanity -nc &>/dev/null fi - +# IANK_BASHRC_RUN because if the command dies for some reason, we +# dont want konsole to disappear. +export IANK_BASHRC_RUN="prof-tmux-attach" +konsole --profile profanity # tree of profanity related processes: # -# i3-chat (ctrl+y) -# prof -# If this is my desktop: -# prof-tail & -# konsole --profile profanity -e tmux -L profanity a -# tmux (attaches to existing profanity session) -# If we are on a computer other than my desktop: -# export IANK_BASHRC_RUN="prof-remote $remote" -# konsole --profile profanity -# prof-remote $remote -# ssh -n $remote -- prof-tail -r | prof-notify & -# ssh -t $remote tmux -L profanity a ||: +# i3-chat (ctrl-y) +# konsole --profile profanity +# prof-tmux-attach +# prof-tail (also ctrl-y) # -# systemd (on my desktop) +# systemd user instance (on my desktop) # profanity.service -> /usr/bin/tmux -L profanity new-session -d profanity +# # distro_end, on $d_host # systemctl --user enable --now profanity.service # /b/ds/subdir_files/.config/systemd/user/profanity.service # /usr/bin/tmux -L profanity new-session -d profanity -# /p/profanity-config/profrc & /d/p/profanity-config: +# /p/profanity-config/profrc and /d/p/profanity-config: # compose.editor=/usr/local/bin/prof-irc (alt-c) # exec emacsclient -s profanity -a "" "$@" # diff --git a/filesystem/usr/local/bin/prof b/filesystem/usr/local/bin/prof deleted file mode 100755 index e28fc62..0000000 --- a/filesystem/usr/local/bin/prof +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# I, Ian Kelling, follow the GNU license recommendations at -# https://www.gnu.org/licenses/license-recommendations.en.html. They -# recommend that small programs, < 300 lines, be licensed under the -# Apache License 2.0. This file contains or is part of one or more small -# programs. If a small program grows beyond 300 lines, I plan to switch -# its license to GPL. - -# Copyright 2024 Ian Kelling - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - - -set -e; . /usr/local/lib/bash-bear; set +e -source /p/c/domain-info -dossh=true -if (( $# >= 1 )); then - remote=$1 -else - # ssh alias - remote=prof - if systemctl --user --quiet is-active profanity || [[ $HOSTNAME == "$d_host" ]]; then - dossh=false - fi -fi - -if $dossh; then - # IANK_BASHRC_RUN because if prof-remote dies for some reason, we - # I dont want konsole to disappear. - export IANK_BASHRC_RUN="prof-remote $remote" - konsole --profile profanity -else - # output will go to ~/.xsession-errors - prof-tail |& ts "%F %T" & - konsole --profile profanity -e tmux -L profanity a -fi diff --git a/filesystem/usr/local/bin/prof-notify b/filesystem/usr/local/bin/prof-notify deleted file mode 100755 index 4294410..0000000 --- a/filesystem/usr/local/bin/prof-notify +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# I, Ian Kelling, follow the GNU license recommendations at -# https://www.gnu.org/licenses/license-recommendations.en.html. They -# recommend that small programs, < 300 lines, be licensed under the -# Apache License 2.0. This file contains or is part of one or more small -# programs. If a small program grows beyond 300 lines, I plan to switch -# its license to GPL. - -# Copyright 2024 Ian Kelling - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e; . /usr/local/lib/bash-bear; set +e - -# -A = --ignore-ancestors (dont kill ourselves) -pkill -fxA '/bin/bash /usr/local/bin/prof-notify' ||: - - -while true; do - read -r line || sleep 5 - #echo "prof-notify debug line: $line" - - # check that the profanity window is not focused - if [[ $line ]] && ! i3-check-profanity &>/dev/null; then - # the profanity tag makes it so new notification replaces old. - dunstify -h string:x-dunst-stack-tag:profanity -- "$line" - fi -done diff --git a/filesystem/usr/local/bin/prof-remote b/filesystem/usr/local/bin/prof-remote deleted file mode 100755 index 71cf344..0000000 --- a/filesystem/usr/local/bin/prof-remote +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# I, Ian Kelling, follow the GNU license recommendations at -# https://www.gnu.org/licenses/license-recommendations.en.html. They -# recommend that small programs, < 300 lines, be licensed under the -# Apache License 2.0. This file contains or is part of one or more small -# programs. If a small program grows beyond 300 lines, I plan to switch -# its license to GPL. - -# Copyright 2024 Ian Kelling - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - - -set -e; . /usr/local/lib/bash-bear; set +e - -remote=$1 -fastcon=0 -while true; do - start=$EPOCHSECONDS - if ! ssh-add -l | grep SHA256:YEhwH5u+wkqkSl/dCq8rFebi2qz7Os3RmIWPxMg13eA &>/dev/null; then - ssh -n $remote - fi - # -n or else it competes with the other ssh for reading stdin. - # -l iank is just a safety measure against misconfig/temporary config in .ssh/config. - ssh -l iank -n $remote -- prof-tail -r |& prof-notify & - ssh -l iank -t $remote tmux -L profanity a ||: - builtin kill %% &> /dev/null ||: - if (( EPOCHSECONDS > start + 600 )); then - fastcon=0 - fi - # we try to reconnect quickly for a while (just once as I write this), - # then try to reconnect slowly. - if (( fastcon < 1 )); then - echo "waiting 10. any key to cancel" - read -rsN1 -t 10 ||: - fastcon=$((fastcon+1)) - else - echo "waiting 120. any key to cancel" - # like sleep but stop on any input - read -rsN1 -t 120 ||: - fi -done diff --git a/filesystem/usr/local/bin/prof-tail b/filesystem/usr/local/bin/prof-tail index a59f48e..40260e5 100755 --- a/filesystem/usr/local/bin/prof-tail +++ b/filesystem/usr/local/bin/prof-tail @@ -20,16 +20,29 @@ # See the License for the specific language governing permissions and # limitations under the License. +# when called from i3, +# output will go to ~/.xsession-errors + + set -e; . /usr/local/lib/bash-bear; set +e # We infinite retry, not exit on error. trap err-info ERR -remote=false -if [[ $1 == -r ]]; then - remote=true - shift +source /p/c/domain-info + +if systemctl --user --quiet is-active profanity || [[ $HOSTNAME == "$d_host" ]]; then + : # no ssh needed +else + # note: -n is probably not needed. I used it before when running ssh in the + # -background with &, so that it would not compete with other commands + # -for stdin. + if ! ssh-add -l | grep SHA256:YEhwH5u+wkqkSl/dCq8rFebi2qz7Os3RmIWPxMg13eA &>/dev/null; then + ssh -nN prof + fi + ssh_cmd="ssh -l iank -n prof --" fi + debug=false if [[ $1 == -d ]]; then debug=true @@ -37,18 +50,19 @@ if [[ $1 == -d ]]; then fi ## flag to do manual testing during development -dev=false tailn=0 if [[ $1 == -e ]]; then dev_date=(-d '-1 day') tailn=100000 debug=true - dev=true shift fi -if ! $dev; then - pkill -fA '^/bin/bash /usr/local/bin/prof-tail' ||: +if pgrep -fA '^/bin/bash /usr/local/bin/prof-tail'; then + if [[ -t 1 ]]; then + echo "prof-tail already running. exiting" + fi + exit 0 fi # kill 0 doesn't seem to be documented in man bash, but it kills the @@ -63,6 +77,7 @@ fi # devinu # miriam # ruben +# johnh xmpp_users=( jtuttle @@ -72,7 +87,6 @@ xmpp_users=( ekokao gregf heshan - johnh jrasata ksiewicz michael @@ -92,8 +106,8 @@ tail-cmd() { # note: man timeout says 124 is when timeout times out. # for debugging, add test2 to the room list and use jtuttle with pidgin. - timeout $secs_till_midnight tail -n$tailn -qF \ - $logdir/rooms/{sys-private,office,operations}_at_conference.fsf.org/$log_today ${user_logs[@]} 2>/dev/null \ + $ssh_cmd tail -n$tailn -qF \ + $logdir/rooms/{sys-private,office,operations}_at_conference.fsf.org/$log_today ${user_logs[@]} 2>/dev/null \ | sed -urn "/$pre iank: /d;s/$pre ([^@ ]+: .*\biank\b.*)/\1/p;s/$pre ([^@:]+)@.*/pm: \1/p" || [[ ${PIPESTATUS[0]} == 124 ]] } @@ -112,11 +126,8 @@ notify-cmd() { pre="^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{6}-[0-9]{2} -" -declare -i fail_loops=0 loop_start while true; do - loop_start=$EPOCH_SECONDS midnight=$(date -d '00:00:00 tomorrow' +%s) - secs_till_midnight=$(( midnight - EPOCHSECONDS )) log_today=$(date '+%Y_%m_%d' "${dev_date[@]}").log logdir=/home/iank/.local/share/profanity/chatlogs/iank_at_fsf.org user_logs=() @@ -124,21 +135,11 @@ while true; do user_logs+=($logdir/${u}_at_fsf.org/$log_today) done - if $remote; then - tail-cmd - else - tail-cmd | while read -r l 2>/dev/null; do notify-cmd "$l"; done - fi - - if (( loop_start >= EPOCH_SECONDS - 1 )); then - fail_loops+=1 - else - fail_loops=0 - fi - if (( fail_loops >= 60 * 60 * 3 )); then - echo "prof-tail fail_loops: $fail_loops" >&2 - exit 1 - fi + tail-cmd | while true; do + if (( EPOCHSECONDS > midnight + 3 )); then break; fi + read -t 15 -r l 2>/dev/null || continue + notify-cmd "$l" + done sleep 2 done diff --git a/fsf-script-lib b/fsf-script-lib index 7660e5e..2c5588b 100644 --- a/fsf-script-lib +++ b/fsf-script-lib @@ -160,8 +160,8 @@ mb() { # echo COMMAND if verbose=true & if it fails. # Like m, but more quietly. mq() { - local evars ret=0 - while [[ $1 == *=* ]]; do + local evars ret=0 var_regex='^[a-zA-Z_][a-zA-Z_0-9]*=' + while [[ $1 =~ $var_regex ]]; do declare -x "$1" evars+="$1 " shift diff --git a/gen-amy-fstab b/gen-amy-fstab index 160fd6a..a8e9b2f 100755 --- a/gen-amy-fstab +++ b/gen-amy-fstab @@ -57,9 +57,9 @@ bootdev=$(awk '$2 == "/mnt/boot2" {print $1}' /mnt/root/root2-fstab) cat >> $nr/etc/fstab <>$nr/etc/fstab diff --git a/i3-sway/common.conf b/i3-sway/common.conf index 5fb5e23..4605376 100644 --- a/i3-sway/common.conf +++ b/i3-sway/common.conf @@ -189,7 +189,7 @@ for_window [class="copyq" instance="copyq" window_type="normal"] floating enable # eh, dont really like web page titles + a long browser name string. for_window [class="firefox" instance="Navigator" window_role="browser"] title_format "b" bindsym $mod+y $ex copyq-restart -bindsym $mod+shift+y $ex "i3-chat" +bindsym $mod+shift+y $ex "i3-chat"; $ex "prof-tail" # unused #bindsym $mod+shift+F1 diff --git a/install-my-scripts b/install-my-scripts index 6d43952..0d37653 100755 --- a/install-my-scripts +++ b/install-my-scripts @@ -60,7 +60,7 @@ rs() { source /a/bin/ds/script-files rs ${my_bin_files[@]} /usr/local/bin -rs $my_lib_files /usr/local/lib +rs ${my_lib_files[@]} /usr/local/lib sre() { diff --git a/machine_specific/frodo/filesystem/etc/btrbk/f2.conf b/machine_specific/frodo/filesystem/etc/btrbk/f2.conf deleted file mode 100644 index ba81c58..0000000 --- a/machine_specific/frodo/filesystem/etc/btrbk/f2.conf +++ /dev/null @@ -1,18 +0,0 @@ -transaction_syslog local7 - -lockfile /var/lock/btrbk-f2.lock - -timestamp_format long-iso - -snapshot_create onchange - -snapshot_preserve 18h 14d 8w 12m -snapshot_preserve_min 2d -snapshot_dir btrbk - -target_preserve 18h 14d 8w 12m -target_preserve_min 2d - -rate_limit no -volume /mnt/f2 -subvolume ro2 diff --git a/machine_specific/frodo/filesystem/etc/btrbk/r2.conf b/machine_specific/frodo/filesystem/etc/btrbk/r2.conf index 57d24ab..2dd61a5 100644 --- a/machine_specific/frodo/filesystem/etc/btrbk/r2.conf +++ b/machine_specific/frodo/filesystem/etc/btrbk/r2.conf @@ -15,8 +15,5 @@ target_preserve_min 2d rate_limit no volume /mnt/r2 -subvolume p +subvolume srip1 subvolume fsf-mailrec -# moved -#subvolume ar -#subvolume roverflow diff --git a/machine_specific/frodo/filesystem/etc/btrbk/r3.conf b/machine_specific/frodo/filesystem/etc/btrbk/r3.conf index b228d82..0fc7d4a 100644 --- a/machine_specific/frodo/filesystem/etc/btrbk/r3.conf +++ b/machine_specific/frodo/filesystem/etc/btrbk/r3.conf @@ -15,6 +15,12 @@ target_preserve_min 2d rate_limit no volume /mnt/r3 -subvolume d-r3 -subvolume siterip + subvolume ar +subvolume d-r3 + +subvolume m8 +subvolume m9 + +subvolume qr +subvolume srip2 diff --git a/machine_specific/frodo/filesystem/etc/btrbk/r4.conf b/machine_specific/frodo/filesystem/etc/btrbk/r4.conf index 4c59d49..9cbe7b8 100644 --- a/machine_specific/frodo/filesystem/etc/btrbk/r4.conf +++ b/machine_specific/frodo/filesystem/etc/btrbk/r4.conf @@ -15,4 +15,16 @@ target_preserve_min 2d rate_limit no volume /mnt/r4 +subvolume m3 +subvolume m4 +subvolume m5 +subvolume m6 +subvolume m7 +subvolume ma +subvolume mb +subvolume mc +subvolume md +subvolume me +subvolume mf + subvolume roverflow diff --git a/machine_specific/frodo/filesystem/etc/btrbk/r5.conf b/machine_specific/frodo/filesystem/etc/btrbk/r5.conf index e3e3129..3798a87 100644 --- a/machine_specific/frodo/filesystem/etc/btrbk/r5.conf +++ b/machine_specific/frodo/filesystem/etc/btrbk/r5.conf @@ -14,9 +14,6 @@ target_preserve 18h 14d 8w 12m target_preserve_min 2d rate_limit no + volume /mnt/r5 subvolume d -subvolume r -subvolume rbase -subvolume rjson -subvolume mhot diff --git a/machine_specific/frodo/filesystem/etc/btrbk/root-r.conf b/machine_specific/frodo/filesystem/etc/btrbk/root-r.conf deleted file mode 100644 index 499d8d1..0000000 --- a/machine_specific/frodo/filesystem/etc/btrbk/root-r.conf +++ /dev/null @@ -1,19 +0,0 @@ -transaction_syslog local7 - -lockfile /var/lock/btrbk-root-r.lock - -timestamp_format long-iso - -snapshot_create onchange - -snapshot_preserve 18h 14d 8w 12m -snapshot_preserve_min 2h -snapshot_dir btrbk - -target_preserve 18h 14d 8w 12m -target_preserve_min 2h - -rate_limit no -volume /mnt/root -subvolume r -target send-receive /mnt/r5/btrbk diff --git a/machine_specific/frodo/filesystem/etc/systemd/system/btrbk-root-r.service b/machine_specific/frodo/filesystem/etc/systemd/system/btrbk-root-r.service deleted file mode 100644 index fbd29d1..0000000 --- a/machine_specific/frodo/filesystem/etc/systemd/system/btrbk-root-r.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Btrbk r to rust -After=multi-user.target - -[Service] -Type=oneshot -ExecStart=/usr/local/bin/sysd-mail-once btrbkr btrbk -c /etc/btrbk/root-r.conf run diff --git a/machine_specific/frodo/filesystem/etc/systemd/system/btrbk-root-r.timer b/machine_specific/frodo/filesystem/etc/systemd/system/btrbk-root-r.timer deleted file mode 100644 index e3b9e9c..0000000 --- a/machine_specific/frodo/filesystem/etc/systemd/system/btrbk-root-r.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Btrbk r to rust timer - -[Timer] -OnCalendar=*-*-* 15:00:00 America/New_York - -[Install] -WantedBy=timers.target diff --git a/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.service b/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.service deleted file mode 100644 index 894a35c..0000000 --- a/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Btrbk to f2 -After=multi-user.target - -[Service] -Type=oneshot -ExecStart=/usr/local/bin/sysd-mail-once btrbkf2 btrbk -c /etc/btrbk/f2.conf run diff --git a/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.timer b/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.timer deleted file mode 100644 index d026fbc..0000000 --- a/machine_specific/frodo/filesystem/etc/systemd/system/btrbkf2.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Btrbk f2 timer - -[Timer] -OnCalendar=*-*-* 13:00:00 America/New_York - -[Install] -WantedBy=timers.target diff --git a/mail-setup b/mail-setup index f5c9ea2..7593487 100755 --- a/mail-setup +++ b/mail-setup @@ -4625,8 +4625,8 @@ sdir=/var/spool/exim4 # honVi-0000u3-82 Failed to create directory "/var/spool/exim4/input": No such file or directory # so, im trying a bind mount to get rid of that. if [[ -e /nocow ]]; then - if ! grep -Fx "/nocow/exim4 /var/spool/exim4 none bind 0 0" /etc/fstab; then - echo "/nocow/exim4 /var/spool/exim4 none bind 0 0" >>/etc/fstab + if ! grep -E "^/nocow/exim4[[:space:]]+/var/spool/exim4[[:space:]]+none[[:space:]]+.*bind" /etc/fstab; then + echo "/nocow/exim4 /var/spool/exim4 none bind,nofail,x-systemd.mount-timeout=290s 0 0" >>/etc/fstab fi u /etc/systemd/system/exim4.service.d/override.conf <<'EOF' [Unit] diff --git a/pkgs b/pkgs index da852e1..f786c69 100644 --- a/pkgs +++ b/pkgs @@ -108,6 +108,7 @@ p3=( # for system76 laptop with i3 keybind. brightnessctl build-essential + btop bwm-ng ccache cheese diff --git a/script-files b/script-files index ce48c9e..70f40a0 100644 --- a/script-files +++ b/script-files @@ -46,5 +46,7 @@ my_service_scripts=( ) # note: turn this into an array if we ever add more -my_lib_files=/a/bin/bash-bear-trap/bash-bear - +my_lib_files=( + /a/bin/bash-bear-trap/bash-bear + fsf-script-lib +) diff --git a/subdir_files/.config/konsolerc b/subdir_files/.config/konsolerc index d3847ad..0ceaeed 100644 --- a/subdir_files/.config/konsolerc +++ b/subdir_files/.config/konsolerc @@ -23,19 +23,18 @@ ShowMenuBarByDefault=false 2 screens: Width=1916 2 screens: XPosition=2 2 screens: YPosition=2 -3840x2160 screen: Height=2156 -3840x2160 screen: Width=3836 -3840x2160 screen: XPosition=1282 -3840x2160 screen: YPosition=2 +3840x2160 screen: Height=2142 +3840x2160 screen: Width=1916 +3840x2160 screen: XPosition=2 +3840x2160 screen: YPosition=16 DP-0=DP-0 DP-1 eDP-1=DP-1 DP-1-1 eDP-1=DP-1-1 DP-1-3 eDP-1=eDP-1 HDMI-1 eDP-1=eDP-1 HDMI-2 eDP-1=HDMI-2 -MenuBar=Enabled -RestorePositionForNextInstance=false -State=AAAA/wAAAAD9AAAAAQAAAAAAAAAAAAAAAPwCAAAAAvsAAAAiAFEAdQBpAGMAawBDAG8AbQBtAGEAbgBkAHMARABvAGMAawAAAAAA/////wAAATUA////+wAAABwAUwBTAEgATQBhAG4AYQBnAGUAcgBEAG8AYwBrAAAAAAD/////AAAA5QD///8AAA78AAAIVgAAAAQAAAAEAAAACAAAAAj8AAAAAQAAAAIAAAACAAAAFgBtAGEAaQBuAFQAbwBvAGwAQgBhAHIAAAAAAP////8AAAAAAAAAAAAAABwAcwBlAHMAcwBpAG8AbgBUAG8AbwBsAGIAYQByAAAAAAD/////AAAAAAAAAAA= +MenuBar=Disabled +State=AAAA/wAAAAD9AAAAAQAAAAAAAAAAAAAAAPwCAAAAAvsAAAAiAFEAdQBpAGMAawBDAG8AbQBtAGEAbgBkAHMARABvAGMAawAAAAAA/////wAAATUA////+wAAABwAUwBTAEgATQBhAG4AYQBnAGUAcgBEAG8AYwBrAAAAAAD/////AAAA5QD///8AAAd8AAAIbAAAAAQAAAAEAAAACAAAAAj8AAAAAQAAAAIAAAACAAAAFgBtAGEAaQBuAFQAbwBvAGwAQgBhAHIAAAAAAP////8AAAAAAAAAAAAAABwAcwBlAHMAcwBpAG8AbgBUAG8AbwBsAGIAYQByAAAAAAD/////AAAAAAAAAAA= ToolBarsMovable=Disabled eDP-1=eDP-1 diff --git a/subdir_files/.config/systemd/user/profanity.service b/subdir_files/.config/systemd/user/profanity.service index 5d55926..bec7c1d 100644 --- a/subdir_files/.config/systemd/user/profanity.service +++ b/subdir_files/.config/systemd/user/profanity.service @@ -10,6 +10,8 @@ Description=profanity # After=default.target. I figured this probably works and is simpler. After=gpg-agent.service After=local-fs.target +# on desktop, we need /d to mount, and based on logs, this is the next target after it mounts: +After=multi-user.target [Service] # tmux requirement diff --git a/system-status b/system-status index 891ef65..371f91c 100755 --- a/system-status +++ b/system-status @@ -386,7 +386,7 @@ write-status() { if grep -qxF $HOSTNAME $x; then all_dirs+=( ${x%.hosts} ); fi done - script_files=("${my_service_scripts[@]}" "${my_bin_files[@]}" $my_lib_files) + script_files=("${my_service_scripts[@]}" "${my_bin_files[@]}" "${my_lib_files[@]}") # Just because i forget a lot, -mmin -NUM means files modified <= NUM minutes ago if (( fmin < 0 )) && [[ $(find "${script_files[@]}" ${all_dirs[@]} -mmin $fmin -type f -print -quit 2>/dev/null) ]]; then