X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Fpartition.DEFAULT;h=1db0197f46a7cae93709e4985a19790fa99cd74e;hb=4029016168015c3aa0accc909c3cff28cf87b929;hp=9914a458c952d514e9c7778d2719b65131607740;hpb=b8ba20ee90ec04b90a294ffc145e204b7e8fdc6c;p=automated-distro-installer diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index 9914a45..1db0197 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -65,22 +65,26 @@ add-part() { # add partition suffix to $dev echo $ret } -# Functions here are commented because they are unused, but left -# intentionally because they follow the pattern and could be useful in -# the future. -#bootdev() { add-part $@ $bootn; } +bootdev() { add-part $@ $bootn; } rootdev() { add-part $@ $rootn; } swapdev() { add-part $@ $swapn; } grub_extdev() { add-part $@ $grub_extn; } -#bios_grubdev() { add-part $@ $bios_grubn; } +bios_grubdev() { add-part $@ $bios_grubn; } crypt-dev() { echo /dev/mapper/crypt_dev_${1##*/}; } crypt-name() { echo crypt_dev_${1##*/}; } root-cryptdev() { crypt-dev $(rootdev $@); } -#swap-cryptdev() { crypt-dev $(swapdev $@); } -#root-cryptname() { crypt-name $(rootdev $@); } -#swap-cryptname() { crypt-name $(swapdev $@); } +swap-cryptdev() { crypt-dev $(swapdev $@); } +root-cryptname() { crypt-name $(rootdev $@); } +swap-cryptname() { crypt-name $(swapdev $@); } +devbyid() { + local f + for f in $FAI/distro-install-common/devbyid \ + /a/bin/fai/fai/config/distro-install-common/devbyid; do + if [[ -e $f ]]; then $f "$@"; fi + done +} ##### end function defs @@ -201,6 +205,8 @@ if [[ ! $DISTRO ]]; then DISTRO=ubuntuxenial elif ifclass VOL_BELENOS; then DISTRO=trisquelbelenos + elif ifclass VOL_FLIDAS; then + DISTRO=trisquelflidas else echo "PARTITIONER ERROR: no distro class/var set" >&2 exit 1