fi
}
-add-wireless-target-h() {
- 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)
+add-wireless-target() {
+ local host
+ if [[ ! $1 ]]; then
+ set -- $h
fi
+ for host; do
+ # c = cabled, w = wireless
+ if ping -q -c1 -w1 ${host}c.b8.nz &>/dev/null; then
+ targets+=(${host}c.b8.nz)
+ elif ping -q -c1 -w1 $host.b8.nz &>/dev/null; then
+ targets+=($host.b8.nz)
+ elif ping -q -c1 -w1 ${host}w.b8.nz &>/dev/null; then
+ targets+=(${host}w.b8.nz)
+ fi
+ done
}
qconf() {
fi
cmd_arg=resume
preserve_arg=-p
- h=sy
- add-wireless-target-h
+ add-wireless-target sy so
fi
if [[ ! $cmd_arg ]]; then
)
for h in ${wireless_home_hosts[@]}; do
if [[ $HOSTNAME != "$h" ]]; then
- add-wireless-target-h
+ add-wireless-target
fi
done
elif $at_work; then
min_root_kb=$(( 1024 * 1024 * 200 )) # 200 gb
tmp=$(( root_size < min_root_kb ))
if (( tmp )); then
- e "warning: $h: root_size=$root_zie < 200gb, perhaps it is booted to bootstrap vol. skipping for now"
+ e "warning: $h: root_size=$root_size < 200gb, perhaps it is booted to bootstrap vol. skipping for now"
continue
fi