crypt: Skip /etc/crypttab if not present

Prevents following error message:

I: *** Including module: crypt ***
/usr/lib/dracut/modules.d/90crypt/module-setup.sh: line 31: /etc/crypttab: No such file or directory
This commit is contained in:
Amadeusz Żołnowski 2013-07-25 23:28:44 +02:00 committed by Harald Hoyer
parent 8f092d0dda
commit 1ae8b8aa02

View File

@ -57,7 +57,7 @@ install() {
inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
fi
if [[ $hostonly ]]; then
if [[ $hostonly ]] && [[ -f /etc/cryptab ]]; then
# filter /etc/crypttab for the devices we need
while read _mapper _dev _rest; do
[[ $_mapper = \#* ]] && continue