From 730b9b8b7711ed29d681dc60f95a220f22439afc Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 13 Aug 2013 01:20:06 +0200 Subject: crypt/crypt-run-generator: also skip if UUID match in crypttab --- modules.d/90crypt/crypt-run-generator.sh | 3 ++- modules.d/90crypt/module-setup.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh index 7842b3cb..a610d428 100755 --- a/modules.d/90crypt/crypt-run-generator.sh +++ b/modules.d/90crypt/crypt-run-generator.sh @@ -8,8 +8,9 @@ dev=$1 luks=$2 if [ -f /etc/crypttab ]; then - while read l rest; do + while read l d rest; do strstr "${l##luks-}" "${luks##luks-}" && exit 0 + strstr "$d" "${luks##luks-}" && exit 0 done < /etc/crypttab fi diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh index ac75f100..1e87559f 100755 --- a/modules.d/90crypt/module-setup.sh +++ b/modules.d/90crypt/module-setup.sh @@ -73,10 +73,10 @@ install() { fi done done < /etc/crypttab > $initdir/etc/crypttab - else - for_each_host_dev_fs check_crypt fi + for_each_host_dev_fs check_crypt + inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh" inst_multiple -o \ -- cgit v1.2.3