From e8d684282c4b3cdd62859217f02711df5947a5c1 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Fri, 10 Mar 2023 15:08:42 -0500 Subject: [PATCH] minor improvements --- brc | 2 ++ btrbk-run | 1 + distro-end | 8 ++++++++ filesystem/etc/cups/client.conf | 1 - switch-mail-host | 9 +++++++-- 5 files changed, 18 insertions(+), 3 deletions(-) delete mode 100644 filesystem/etc/cups/client.conf diff --git a/brc b/brc index 6389c87..82b635c 100644 --- a/brc +++ b/brc @@ -867,6 +867,8 @@ ccomp bg d z() { builtin fg "$@"; } ccomp fg z +x() { builtin kill %%; } + dc() { diff --strip-trailing-cr -w "$@" # diff content } diff --git a/btrbk-run b/btrbk-run index cce2abe..755e5cc 100644 --- a/btrbk-run +++ b/btrbk-run @@ -368,6 +368,7 @@ echo "mountpoints: ${mountpoints[*]}" ##### end command line parsing ######## +# todo: this has a timing problem, since btrbk.timer could activate the service after this check. if ! $fast && [[ $source ]]; then if [[ $(ssh $source ps --no-headers -o comm 1) == systemd ]]; then status=$(ssh $source systemctl is-active btrbk.service) || : # normally returns 3 diff --git a/distro-end b/distro-end index 2970028..6f7b871 100755 --- a/distro-end +++ b/distro-end @@ -2177,6 +2177,14 @@ esac ### end bitcoin +case $HOSTNAME in + kw|x3) + sd /etc/cups/client.conf <<'EOF' +ServerName printserver0.office.fsf.org +EOF + ;; +esac + end_msg <<'EOF' In mate settings settings, change scrolling to two-finger, diff --git a/filesystem/etc/cups/client.conf b/filesystem/etc/cups/client.conf deleted file mode 100644 index 70a9152..0000000 --- a/filesystem/etc/cups/client.conf +++ /dev/null @@ -1 +0,0 @@ -#ServerName printserver0.office.fsf.org diff --git a/switch-mail-host b/switch-mail-host index ffff83e..ffb0814 100644 --- a/switch-mail-host +++ b/switch-mail-host @@ -10,6 +10,10 @@ Turn off mail receiving on OLD_HOST, run btrbk to move mail to NEW_HOST, turn on mail receiving on NEW_HOST. Assumes we want to move all filesystems unless passing -o. +-a Avoid snapshot /a, /q, and similar. If we haven't + made any changes in the last hour, there is no + need to snapshot anything but /o, and we will + just do that once. -i Disallow incremental backup. -o Only btrbk /o, instead of all filesystems. --force Run even though our local state does not say that MAIL_HOST is @@ -58,10 +62,11 @@ mail_only=false host2_only=false force=false mp_args="-m /o,/a,/ar,/q,/qr" -temp=$(getopt -l force,help ioh "$@") || usage 1 +temp=$(getopt -l force,help aioh "$@") || usage 1 eval set -- "$temp" while true; do case $1 in + -a) snapshot_arg=resume ;; --force) force=true ;; -i) incremental_arg="-i" ;; -o) @@ -241,7 +246,7 @@ EOF e Running initial btrbk -m btrbk-run -v $bbk_args $incremental_arg $mp_args || ret=$? +m btrbk-run -v $bbk_args $incremental_arg $mp_args $snapshot_arg || ret=$? if (( ret )); then err "failed initial btrbk" exit $ret -- 2.30.2