minor improvements
[distro-setup] / btrbk-run
index 2eb53c1e25700c6b7dad52e02a9eaf1bcdab2d2b..755e5cc25cc329e38ffb02e752bbce5706610f8c 100644 (file)
--- a/btrbk-run
+++ b/btrbk-run
@@ -269,7 +269,9 @@ if [[ ! -v targets && ! $source ]]; then
             targets+=(x3wg.b8.nz)
           fi
         fi
-        for h in frodo kd; do
+        # temporarily disabled while doing recovery
+#        for h in frodo kd; do
+        for h in kd; do
           if [[ $HOSTNAME == "$h" ]]; then
             continue
           fi
@@ -366,6 +368,7 @@ echo "mountpoints: ${mountpoints[*]}"
 
 ##### end command line parsing ########
 
+# todo: this has a timing problem, since btrbk.timer could activate the service after this check.
 if ! $fast && [[ $source ]]; then
   if [[ $(ssh $source ps --no-headers -o comm 1) == systemd ]]; then
     status=$(ssh $source systemctl is-active btrbk.service) || : # normally returns 3
@@ -659,7 +662,9 @@ done
 if [[ $source ]]; then
   m mount-latest-subvol "${subvols[@]}"
 else
-  m /a/exe/mount-latest-remote ${targets[@]}
+  for tg in ${targets[@]}; do
+    m /a/exe/mount-latest-remote "$tg" "${subvols[@]}" || ret=$?
+  done
 fi
 
 if [[ $ret == 0 ]]; then