From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 48175138201 for ; Sat, 21 Jul 2012 20:02:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 48ACC21C040; Sat, 21 Jul 2012 17:44:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 151AC21C040 for ; Sat, 21 Jul 2012 17:44:57 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 49C9D1B4133 for ; Sat, 21 Jul 2012 17:44:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 07030E5434 for ; Sat, 21 Jul 2012 17:44:55 +0000 (UTC) From: "Richard Yao" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Yao" Message-ID: <1342892498.e05ab0d1a1e739e152ec6ef77a6335891f34fe2b.ryao@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/initrd.scripts X-VCS-Directories: defaults/ X-VCS-Committer: ryao X-VCS-Committer-Name: Richard Yao X-VCS-Revision: e05ab0d1a1e739e152ec6ef77a6335891f34fe2b X-VCS-Branch: master Date: Sat, 21 Jul 2012 17:44:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 670451bc-8fb7-465a-b452-7f1f23644af4 X-Archives-Hash: 0531e3807e5570872fb0b24c8de21d86 commit: e05ab0d1a1e739e152ec6ef77a6335891f34fe2b Author: Richard Yao cs stonybrook edu> AuthorDate: Sat Jul 21 17:41:38 2012 +0000 Commit: Richard Yao gentoo org> CommitDate: Sat Jul 21 17:41:38 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=e05ab0d1 Force ZFS to explicitly import pool when LUKS is present --- defaults/initrd.scripts | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 46364de..4f0ce1b 100755 --- 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}"