From 13dce29e29b79c5c9f3465356db481cb28ea31a7 Mon Sep 17 00:00:00 2001 From: "Anton V. Boyarshinov" Date: Tue, 27 Nov 2012 16:34:18 +0400 Subject: [PATCH] LUKS: prevent luks activating on disassembled RAID components When RAID metadata version 0.9 used, there are no differences at the start sectors of disk between RAID component and standalone disk. So, testing by 'cryptsetup isLuks' can generate false positives. Adding $ID_FS_TYPE checking should fix the problem. --- features/luks/data/lib/initrd/filters/luks | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/luks/data/lib/initrd/filters/luks b/features/luks/data/lib/initrd/filters/luks index 1d8f8b0..c584860 100755 --- a/features/luks/data/lib/initrd/filters/luks +++ b/features/luks/data/lib/initrd/filters/luks @@ -4,6 +4,10 @@ . /scripts/functions DEVNAME="/dev/${DEVNAME#/dev}" + +[ $ID_FS_TYPE = "crypto_LUKS" ] || + exit 0 + cryptsetup isLuks "$DEVNAME" || exit 0 -- 1.7.12.3