X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Fpartition.DEFAULT;h=fac3155a98e03cb3f08e25eb32f1f1d24b4f8bb5;hb=4c0b3d508093cd1561f6ae887f154f06383b67d3;hp=c2b73cbc5f63217d83bde84187428a32231cd669;hpb=a8ec695d6a39792133a21e9eca70e69f9fab107b;p=automated-distro-installer diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index c2b73cb..fac3155 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -173,6 +173,12 @@ first_boot_dev=$(bootdev ${devs[0]}) # keyfiles generated like: # head -c 2048 /dev/urandom | od | s dd of=/q/root/luks/host-demohost luks_dir=${LUKS_DIR:-/var/lib/fai/config/distro-install-common/luks} + +if [[ ! -e $luks_dir/host-$HOSTNAME ]]; then + echo "$0: error: no key for hostname at $luks_dir/host-$HOSTNAME" >&2 + exit 1 +fi + if ifclass tp; then lukspw=$(cat $luks_dir/traci) else @@ -317,6 +323,13 @@ $first_root_crypt /home btrfs noatime,subvol=home_$DISTRO 0 0 $first_boot_dev /boot btrfs noatime,subvol=boot_$DISTRO 0 0 EOF + +if ifclass treetowl; then + cat >> /tmp/fai/fstab <<'EOF' +UUID=3f7b31cd-f299-40b4-a86b-7604282e2715 /i btrfs noatime 0 2 +EOF +fi + swaps=() for dev in ${devs[@]}; do swaps+=(`swap-cryptname`)