info `gettext "Setting up swap:"` "[$swap]" uuid=$(blkid -o value -s UUID $swap)
for target in "UUID=$uuid" $swap; do
if [ -n "$target" ] && grep -qs "^$target " /etc/fstab; then sed -i "s:^$target :\#$target :" /etc/fstab warn "Commented out your unencrypted swap from /etc/fstab"
fi
done
And in fact it'd need to look up the LUKS UUID anyway in order to write it to crypttab. Compare partman-crypto:
# Use UUID for LUKS devices
local uuid=$(cryptsetup luksUUID "$source")
source= "UUID=$ uuid"
if cryptsetup isLuks "$source"; then
fi
# Add entry to crypttab etc/crypttab
echo "$target $source $keyfile $opts" >> /target/
and ecryptfs- setup-swap:
info `gettext "Setting up swap:"` "[$swap]"
uuid=$ (blkid -o value -s UUID $swap)
sed -i "s:^$target :\#$target :" /etc/fstab
warn "Commented out your unencrypted swap from /etc/fstab"
for target in "UUID=$uuid" $swap; do
if [ -n "$target" ] && grep -qs "^$target " /etc/fstab; then
fi
done
while :; do
i=$(( i+1)) cryptswap$ i" ] || break aes-cbc- essiv:sha256" >> /etc/crypttab
[ -e "/dev/mapper/
done
# Add crypttab entry
echo "cryptswap$i $swap /dev/urandom swap,cipher=