This commit is contained in:
teldra 2022-02-08 19:02:57 +01:00
parent 76ccacb62d
commit 22a94ea2e5

View File

@ -134,9 +134,9 @@ do_partition() {
T="${TARGET_PHY_ID}-part${TARGET_PART}"
if [ "${ENCRYPTION_STYLE}" == "a" ] || [ "${ENCRYPTION_STYLE}" == "c" ] || [ "${ENCRYPTION_STYLE}" == "d" ]; then
T="/dev/mapper/luks_${TARGETNAME_UNDERSCORE}"
echo -n $pass | cryptsetup luksFormat --type luks1 "${TARGET_PHY_ID}-part${TARGET_PART}" -d -
#echo -n $pass | sudo cryptsetup luksOpen /dev/sdc1 sdc1 -d -
echo -n $pass | cryptsetup luksOpen "${TARGET_PHY_ID}-part${TARGET_PART}" "luks_${TARGETNAME_UNDERSCORE}" -d -
echo -n "${PASS}" | cryptsetup luksFormat --type luks1 "${TARGET_PHY_ID}-part${TARGET_PART}" -d -
#echo -n "${PASS}" | sudo cryptsetup luksOpen /dev/sdc1 sdc1 -d -
echo -n "${PASS}" | cryptsetup luksOpen "${TARGET_PHY_ID}-part${TARGET_PART}" "luks_${TARGETNAME_UNDERSCORE}" -d -
fi
vgcreate -y --force "vg_${TARGETNAME_UNDERSCORE}" "${T}"
lvcreate -y --name swap -L "${SWAPSIZE}G" "vg_${TARGETNAME_UNDERSCORE}"