X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Fpartition.DEFAULT;h=ebd38667c418824240cd7bb96bebb24d2a54949d;hp=afd88a007fc3d503e33f39a65e0dfbbe772b66b0;hb=845c2b9e9e7e25b3dfa3d7f750d0acae0e50caf4;hpb=4acdd54dd395d63eef73778547fa8cc119ac6fca diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index afd88a0..ebd3866 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -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=()