iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f68d910
)
backup improvement
author
Ian Kelling
<ian@iankelling.org>
Sat, 27 Apr 2024 21:40:49 +0000
(17:40 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Sat, 27 Apr 2024 22:07:26 +0000
(18:07 -0400)
btrbk-run
patch
|
blob
|
history
diff --git
a/btrbk-run
b/btrbk-run
index ae16266fbe149394753e8810657c422db7c3d9ce..b4bd302918c0a559328ee8d3fa8a7e07c95f87e9 100644
(file)
--- a/
btrbk-run
+++ b/
btrbk-run
@@
-113,12
+113,21
@@
add-x3-target() {
fi
}
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
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() {
}
qconf() {
@@
-288,8
+297,7
@@
if $kd_spread; then
fi
cmd_arg=resume
preserve_arg=-p
fi
cmd_arg=resume
preserve_arg=-p
- h=sy
- add-wireless-target-h
+ add-wireless-target sy so
fi
if [[ ! $cmd_arg ]]; then
fi
if [[ ! $cmd_arg ]]; then
@@
-370,7
+378,7
@@
if [[ ! -v targets && ! $source ]]; then
)
for h in ${wireless_home_hosts[@]}; do
if [[ $HOSTNAME != "$h" ]]; 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
fi
done
elif $at_work; then
@@
-612,7
+620,7
@@
df --output=size,pcent / | tail -n1"
min_root_kb=$(( 1024 * 1024 * 200 )) # 200 gb
tmp=$(( root_size < min_root_kb ))
if (( tmp )); then
min_root_kb=$(( 1024 * 1024 * 200 )) # 200 gb
tmp=$(( root_size < min_root_kb ))
if (( tmp )); then
- e "warning: $h: root_size=$root_
zi
e < 200gb, perhaps it is booted to bootstrap vol. skipping for now"
+ e "warning: $h: root_size=$root_
siz
e < 200gb, perhaps it is booted to bootstrap vol. skipping for now"
continue
fi
continue
fi