fix default mounts for o when pulling
authorIan Kelling <ian@iankelling.org>
Mon, 29 Jul 2019 17:03:07 +0000 (13:03 -0400)
committerIan Kelling <ian@iankelling.org>
Mon, 29 Jul 2019 17:03:07 +0000 (13:03 -0400)
btrbk-run

index 3ec2221d1238b22ab596f71b47e90f54a68365c1..f6570a167f9cc54cc30b212290ef4997b97509d2 100644 (file)
--- 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