Lines 1654-1660
Link Here
|
1654 |
then |
1654 |
then |
1655 |
good_msg "ZFS pool ${ZFS_POOL} already imported." |
1655 |
good_msg "ZFS pool ${ZFS_POOL} already imported." |
1656 |
|
1656 |
|
1657 |
if [ -n "${CRYPT_ROOT}" -o -n "${CRYPT_SWAP}" ] |
1657 |
if [ -n "${CRYPT_ROOTS}" -o -n "${CRYPT_SWAP}" ] |
1658 |
then |
1658 |
then |
1659 |
good_msg "LUKS detected. Reimporting ${ZFS_POOL} ..." |
1659 |
good_msg "LUKS detected. Reimporting ${ZFS_POOL} ..." |
1660 |
|
1660 |
|
Lines 1760-1771
Link Here
|
1760 |
;; |
1760 |
;; |
1761 |
swap) |
1761 |
swap) |
1762 |
local TYPE=SWAP |
1762 |
local TYPE=SWAP |
|
|
1763 |
local CRYPT_INDEX=0 |
1763 |
;; |
1764 |
;; |
1764 |
esac |
1765 |
esac |
1765 |
|
1766 |
|
1766 |
eval local LUKS_DEVICE='"${CRYPT_'${TYPE}'}"' LUKS_NAME="$1" LUKS_KEY='"${CRYPT_'${TYPE}'_KEY}"' |
1767 |
eval local LUKS_DEVICE='"${CRYPT_'${TYPE}'}"' LUKS_NAME="$1_${CRYPT_INDEX}" LUKS_KEY='"${CRYPT_'${TYPE}'_KEY}"' |
1767 |
eval local LUKS_KEYDEV='"${CRYPT_'${TYPE}'_KEYDEV}"' LUKS_TRIM='"${CRYPT_'${TYPE}'_TRIM}"' |
1768 |
eval local LUKS_KEYDEV='"${CRYPT_'${TYPE}'_KEYDEV}"' LUKS_TRIM='"${CRYPT_'${TYPE}'_TRIM}"' |
1768 |
eval local OPENED_LOCKFILE='"${CRYPT_'${TYPE}'_OPENED_LOCKFILE}"' |
1769 |
eval local OPENED_LOCKFILE='"${CRYPT_'${TYPE}'_'${CRYPT_INDEX}'_OPENED_LOCKFILE}"' |
1769 |
local DEV_ERROR=0 KEY_ERROR=0 KEYDEV_ERROR=0 |
1770 |
local DEV_ERROR=0 KEY_ERROR=0 KEYDEV_ERROR=0 |
1770 |
local mntkey="/mnt/key/" crypt_filter_ret= |
1771 |
local mntkey="/mnt/key/" crypt_filter_ret= |
1771 |
|
1772 |
|
Lines 2262-2270
Link Here
|
2262 |
[ -n "${CRYPT_ROOT_KEY}" ] && [ -z "${CRYPT_ROOT_KEYDEV}" ] \ |
2263 |
[ -n "${CRYPT_ROOT_KEY}" ] && [ -z "${CRYPT_ROOT_KEYDEV}" ] \ |
2263 |
&& sleep 6 && bootstrapKey "ROOT" |
2264 |
&& sleep 6 && bootstrapKey "ROOT" |
2264 |
|
2265 |
|
2265 |
if [ -n "${CRYPT_ROOT}" ] |
2266 |
if [ -n "${CRYPT_ROOTS}" ] |
2266 |
then |
2267 |
then |
2267 |
openLUKS "root" |
2268 |
CRYPT_INDEX=0 |
|
|
2269 |
for CRYPT_ROOT in ${CRYPT_ROOTS}; do |
2270 |
openLUKS "root" |
2271 |
let CRYPT_INDEX=${CRYPT_INDEX}+1 |
2272 |
done |
2268 |
if [ -n "${REAL_ROOT}" ] |
2273 |
if [ -n "${REAL_ROOT}" ] |
2269 |
then |
2274 |
then |
2270 |
# Rescan volumes |
2275 |
# Rescan volumes |
Lines 2276-2282
Link Here
|
2276 |
|
2281 |
|
2277 |
# same for swap, but no need to sleep if root was unencrypted |
2282 |
# same for swap, but no need to sleep if root was unencrypted |
2278 |
[ -n "${CRYPT_SWAP_KEY}" ] && [ -z "${CRYPT_SWAP_KEYDEV}" ] \ |
2283 |
[ -n "${CRYPT_SWAP_KEY}" ] && [ -z "${CRYPT_SWAP_KEYDEV}" ] \ |
2279 |
&& { [ -z "${CRYPT_ROOT}" ] && sleep 6; bootstrapKey "SWAP"; } |
2284 |
&& { [ -z "${CRYPT_ROOTS}" ] && sleep 6; bootstrapKey "SWAP"; } |
2280 |
|
2285 |
|
2281 |
if [ -n "${CRYPT_SWAP}" ] |
2286 |
if [ -n "${CRYPT_SWAP}" ] |
2282 |
then |
2287 |
then |
Lines 2313-2319
Link Here
|
2313 |
# isn't known yet. |
2318 |
# isn't known yet. |
2314 |
write_env_file \ |
2319 |
write_env_file \ |
2315 |
"${CRYPT_ENV_FILE}" \ |
2320 |
"${CRYPT_ENV_FILE}" \ |
2316 |
CRYPT_ROOT \ |
2321 |
CRYPT_ROOTS \ |
2317 |
CRYPT_ROOT_TRIM \ |
2322 |
CRYPT_ROOT_TRIM \ |
2318 |
CRYPT_SILENT \ |
2323 |
CRYPT_SILENT \ |
2319 |
CRYPT_SWAP |
2324 |
CRYPT_SWAP |