remove btrbk office logic since no permanent hosts there anymore
authorIan Kelling <ian@iankelling.org>
Sat, 29 Mar 2025 14:23:33 +0000 (10:23 -0400)
committerIan Kelling <ian@iankelling.org>
Sat, 29 Mar 2025 14:23:33 +0000 (10:23 -0400)
filesystem/usr/local/bin/btrbk-run

index 24edb9621673c9b80b6bb5554c4cefa9b652ee0f..172de8e118a94ae67ca30cd9655997350bca65be 100755 (executable)
@@ -99,9 +99,6 @@ uninstalled-file-die() {
 set-location() {
   laptop=false
   case $HOSTNAME in
-    kw)
-      at_work=true
-      ;;
     kd|frodo)
       at_home=true
       ;;
@@ -111,9 +108,6 @@ set-location() {
            && ip n show 10.2.0.1 | grep . &>/dev/null; then
         # note: logic duplicated in 11-iank
         at_home=true
-      elif ping -q -c1 -w1 hal.office.fsf.org &>/dev/null \
-          && ip n show 192.168.0.26 | grep . &>/dev/null; then
-        at_work=true
       fi
       ;;
   esac
@@ -133,10 +127,7 @@ exit-if-no-default-targets() {
 }
 
 add-x3-target() {
-  # main work machine
-  if ping -q -c1 -w1 x3.office.fsf.org &>/dev/null; then
-    targets+=(x3.office.fsf.org)
-  elif ping -q -c1 -w1 x3.b8.nz &>/dev/null; then
+  if ping -q -c1 -w1 x3.b8.nz &>/dev/null; then
     # in case we took it home
     targets+=(x3.b8.nz)
   elif ping -q -c1 -w1 x3w.b8.nz &>/dev/null; then
@@ -607,7 +598,6 @@ fi
 # targets, plus any given on the command line.
 
 
-at_work=false
 at_home=false
 set-location
 
@@ -623,10 +613,7 @@ if [[ ! -v targets && ! $source ]]; then
       targets+=(frodo.b8.nz)
     fi
     wireless_home_hosts=(
-      # out of comission for now
-      #x2
-      # sy is so temp
-      #sy
+      sy
       so
     )
     for h in ${wireless_home_hosts[@]}; do
@@ -634,16 +621,6 @@ if [[ ! -v targets && ! $source ]]; then
         add-wireless-target
       fi
     done
-  elif $at_work; then
-    targets+=(b8.nz)
-    for h in x2 x3 kw; do
-      if [[ $HOSTNAME == "$h" ]]; then
-        continue
-      fi
-      if ping -q -c1 -w1 $h.office.fsf.org &>/dev/null; then
-        targets+=($h.office.fsf.org)
-      fi
-    done
   else
     targets+=(b8.nz)
   fi