- if $at_home; then
- if ! $kd_spread && [[ $HOSTNAME != x3 ]]; then
- # 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 $h.b8.nz &>/dev/null; then
- # in case we took it home
- targets+=(x3.b8.nz)
- else
- targets+=(x3wg.b8.nz)
- fi
- fi
- # temporarily disabled while doing recovery
- # for h in frodo kd; do
- for h in kd; do
- if [[ $HOSTNAME == "$h" ]]; then
- continue
- fi
- targets+=($h.b8.nz)
- done
- for h in x2 sy; do
- if [[ $HOSTNAME == "$h" ]]; then
- continue
- fi
- if ping -q -c1 -w1 $h.b8.nz &>/dev/null; then
- targets+=($h.b8.nz)
- elif ping -q -c1 -w1 ${h}w.b8.nz &>/dev/null; then
- targets+=(${h}w.b8.nz)
- fi
- done
- elif $at_work; then
- if ping -q -c1 -w1 iank.vpn.office.fsf.org &>/dev/null; then
- targets+=(iank.vpn.office.fsf.org)
- else
- targets+=(i.b8.nz)
- fi
- 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+=(i.b8.nz)
- fi