X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=sidebyside;f=fai%2Fconfig%2Fhooks%2Fpartition.DEFAULT;h=7c88c7492a8b808ceeb52eaf0c3eb25b87260c47;hb=fe81034ee9664d8e131bac218b40d99a58a31649;hp=afd88a007fc3d503e33f39a65e0dfbbe772b66b0;hpb=4acdd54dd395d63eef73778547fa8cc119ac6fca;p=automated-distro-installer diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index afd88a0..7c88c74 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -153,18 +153,23 @@ 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) +if ((`nproc` > 2)); then + mopts=,compress=zstd +fi +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=() @@ -582,8 +587,8 @@ EOF else # note, fai creates the mountpoints listed here cat > /tmp/fai/fstab <