various improvements and fixes, some flidas related
[distro-setup] / btrbk-run
index 454f12cbf93d348f4ec92bd93940fa8e9937d373..f45fe36f5176cbec8c776d8186152c47e0ebfa88 100755 (executable)
--- a/btrbk-run
+++ b/btrbk-run
@@ -113,14 +113,23 @@ if (( ${#mountpoints[@]} )); then
         fi
     done
 else # set default mountpoints
-    if [[ $HOSTNAME == frodo ]]; then
-        prospective_mps=(/i)
-    else
-        prospective_mps=(/a /q)
-        if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
-            prospective_mps+=(/o)
-        fi
-    fi
+    case $HOSTNAME in
+        frodo)
+            prospective_mps=(/i)
+            ;;
+        *)
+            prospective_mps=(/a /q)
+            if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
+                prospective_mps+=(/o)
+            fi
+            ;;
+    esac
+    case ${targets[0]} in
+        kw|kww)
+            prospective_mps=(/a)
+            ;;
+    esac
+
     for mp in ${prospective_mps[@]}; do # default mountpoints to sync
         if [[ -e /nocow/btrfs-stale/$mp ]]; then
             echo "$0: warning: $mp stale, not adding to default mountpoints"