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=()