-bootdev() { add-part $@ $bootn; }
+# 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; }
rootdev() { add-part $@ $rootn; }
swapdev() { add-part $@ $swapn; }
grub_extdev() { add-part $@ $grub_extn; }
rootdev() { add-part $@ $rootn; }
swapdev() { add-part $@ $swapn; }
grub_extdev() { add-part $@ $grub_extn; }
#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 $@); }
#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 $@); }
mkdir -p /mnt/root_$DISTRO/boot
# could set default subvol like this, but no reason to.
mkdir -p /mnt/root_$DISTRO/boot
# could set default subvol like this, but no reason to.
cat > /tmp/fai/fstab <<EOF
$first_root_crypt / btrfs noatime,subvol=root_$DISTRO 0 0
cat > /tmp/fai/fstab <<EOF
$first_root_crypt / btrfs noatime,subvol=root_$DISTRO 0 0
$first_root_crypt /mnt/root btrfs noatime,subvolid=0 0 0
$first_boot_dev /boot btrfs noatime,subvol=$boot_vol 0 0
EOF
$first_root_crypt /mnt/root btrfs noatime,subvolid=0 0 0
$first_boot_dev /boot btrfs noatime,subvol=$boot_vol 0 0
EOF