restore_new_btrbk=false
restore_old_btrbk=false
-cleanup() {
+errcatch-cleanup() {
if $restore_new_btrbk; then
e WARNING: due to failure, btrbk.timer may need manual restoration:
e $new_shell sudo systemctl start btrbk.timer
if $new_shell systemctl is-active btrbk.timer; then
m $new_shell sudo systemctl stop btrbk.timer
- _errcatch_cleanup=cleanup
restore_new_btrbk=true
fi
if $old_shell systemctl is-active btrbk.timer; then
m $old_shell sudo systemctl stop btrbk.timer
- _errcatch_cleanup=cleanup
restore_old_btrbk=true
fi
# ipv6 i think.
+if ! m btrbk-run -v $bbk_args $mp_args; then
+ ret=$?
+ err "failed initial btrbk"
+ exit $ret
+fi
+
m $old_shell /a/exe/primary-setup $new_hostname
-if ! m btrbk-run -v $bbk_args $mp_args; then
+if ! m btrbk-run -v $bbk_args -m /o; then
ret=$?
bang="$(printf "$(tput setaf 5)█$(tput sgr0)%.0s" 1 2 3 4 5 6 7)"
- e $bang failed btrbk. restoring old host as primary
+ e $bang failed btrbk of /o. restoring old host as primary
m $old_shell /a/exe/primary-setup localhost
exit $ret
fi