X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=btrbk-run;h=f6570a167f9cc54cc30b212290ef4997b97509d2;hb=c926b55471a48cbcd99607ce1e003da55211d166;hp=3ec2221d1238b22ab596f71b47e90f54a68365c1;hpb=2307b08212504845da46bff3eecbd8642e18e755;p=distro-setup diff --git a/btrbk-run b/btrbk-run index 3ec2221..f6570a1 100644 --- a/btrbk-run +++ b/btrbk-run @@ -238,8 +238,17 @@ else # ;; *) prospective_mps=(/a /q) - if [[ $HOSTNAME == "$MAIL_HOST" ]]; then - prospective_mps+=(/o) + if [[ $source ]]; then + source_state="$(ssh $source cat /a/bin/bash_unpublished/source-state)" + eval "$source_state" + source_host="$(ssh $source cat /etc/hostname)" + if [[ $source_host == "$MAIL_HOST" ]]; then + prospective_mps+=(/o) + fi + else + if [[ $HOSTNAME == "$MAIL_HOST" ]]; then + prospective_mps+=(/o) + fi fi ;; esac