projects
/
genkernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e92078
)
Force ZFS to explicitly import pool when LUKS is present
author
Richard Yao
<ryao@cs.stonybrook.edu>
Sat, 21 Jul 2012 17:41:38 +0000
(13:41 -0400)
committer
Richard Yao
<ryao@cs.stonybrook.edu>
Sat, 21 Jul 2012 17:41:38 +0000
(13:41 -0400)
defaults/initrd.scripts
patch
|
blob
|
history
diff --git
a/defaults/initrd.scripts
b/defaults/initrd.scripts
index 46364def8c742bea29f65900e71a66a665e9418a..4f0ce1b543e1e3eef575b53d31d8b4cf0095ffdd 100755
(executable)
--- a/
defaults/initrd.scripts
+++ b/
defaults/initrd.scripts
@@
-674,7
+674,14
@@
startVolumes() {
if [ "$(zpool list -H -o name ${ZFS_POOL} 2>&1)" = "$ZFS_POOL" ]
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
good_msg "Importing ZFS pool ${ZFS_POOL}"