bunch of minor updates
[automated-distro-installer] / fai / config / hooks / partition.DEFAULT
index afd88a007fc3d503e33f39a65e0dfbbe772b66b0..ebd38667c418824240cd7bb96bebb24d2a54949d 100755 (executable)
@@ -153,18 +153,20 @@ else
   wipe=true
 fi
 
-## ignore disks that are mounted, eg when running from fai-cd
-declare -A disk_excludes
-while read -r l; do
-  eval "$l"
-  if [[ ! $PKNAME ]]; then
-    PKNAME="$KNAME"
-  fi
-  if [[ $MOUNTPOINT ]]; then
-    disk_excludes[$PKNAME]=true
-  fi
-done < <(lsblk -nP -o KNAME,MOUNTPOINT,PKNAME)
 
+declare -A disk_excludes
+if ! ifclass USE_MOUNTED; then
+  ## ignore disks that are mounted, eg when running from fai-cd
+  while read -r l; do
+    eval "$l"
+    if [[ ! $PKNAME ]]; then
+      PKNAME="$KNAME"
+    fi
+    if [[ $MOUNTPOINT ]]; then
+      disk_excludes[$PKNAME]=true
+    fi
+  done < <(lsblk -nP -o KNAME,MOUNTPOINT,PKNAME)
+fi
 
 hdds=()
 ssds=()