Force ZFS to explicitly import pool when LUKS is present

cleanup-cruft
Richard Yao 13 years ago
parent 1e92078650
commit e05ab0d1a1

@ -674,7 +674,14 @@ startVolumes() {
if [ "$(zpool list -H -o name ${ZFS_POOL} 2>&1)" = "$ZFS_POOL" ] if [ "$(zpool list -H -o name ${ZFS_POOL} 2>&1)" = "$ZFS_POOL" ]
then then
good_msg "ZFS pool ${ZFS_POOL} already imported" good_msg "ZFS pool ${ZFS_POOL} already imported."
if [ -n "${CRYPT_ROOT}" -o -n "${CRYPT_SWAP}" ]
then
good_msg "LUKS detected. Reimporting ${ZFS_POOL}"
/sbin/zpool export -f "${ZFS_POOL}"
/sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}"
fi
else else
good_msg "Importing ZFS pool ${ZFS_POOL}" good_msg "Importing ZFS pool ${ZFS_POOL}"

Loading…
Cancel
Save