+ # tests ssh connection. crafted this to not need to do escape chars
+
+ if ! $mail_only && ! $pull_reexec ; then
+ if ! $force; then
+ if ! $old_shell switch-mail-host --check-installed; then
+ die "failed: $old_shell switch-mail-host --check-installed"
+ fi
+ fi
+ tmpf=$(mktemp)
+ m scp -F $HOME/.ssh/confighome root@$old_host:/usr/local/bin/switch-mail-host $tmpf
+ if ! diff -q $tmpf ${BASH_SOURCE[0]}; then
+ e "found different version on old_host=$old_hostname, reexecing"
+ m install -T $tmpf /usr/local/bin/switch-mail-host
+ m /usr/local/bin/switch-mail-host --pull-reexec "${orig_args[@]}"
+ exit 0
+ fi
+ fi
+
+ f=/a/bin/bash_unpublished/source-state
+ if ! old_info=$($old_shell "hostname; sed -n s,.*MAIL_HOST=,,p $f; sed -n s,.*HOST2=,,p $f"); then
+ echo "$pre: error: failed ssh. retrying failed $old_shell with -v for more info:"