From: Harald Hoyer Date: Mon, 30 Jul 2012 20:27:53 +0000 (+0200) Subject: crypt/crypt-run-generator.sh: check if crypttab exists X-Git-Tag: 023~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d3c192621861bb82966369d74300c504f6d786f;p=platform%2Fupstream%2Fdracut.git crypt/crypt-run-generator.sh: check if crypttab exists --- diff --git a/modules.d/90crypt/crypt-run-generator.sh b/modules.d/90crypt/crypt-run-generator.sh index cb3aedc..f2f2da1 100755 --- a/modules.d/90crypt/crypt-run-generator.sh +++ b/modules.d/90crypt/crypt-run-generator.sh @@ -5,10 +5,11 @@ dev=$1 luks=$2 -while read l rest; do - strstr "${l##luks-}" "${luks##luks-}" && exit 0 -done < /etc/crypttab - +if [ -f /etc/crypttab ]; then + while read l rest; do + strstr "${l##luks-}" "${luks##luks-}" && exit 0 + done < /etc/crypttab +fi echo "$luks $dev" >> /etc/crypttab /lib/systemd/system-generators/systemd-cryptsetup-generator