crypt: create locking directory /run/cryptsetup

For LUKS2 partitions cryptsetup needs a locking directory. If it does
not exist, cryptsetup will create it, but produce a warning

WARNING: Locking directory /run/cryptsetup is missing!

in the process that we do not want to see in the dracut output.
master
Jonas Witschel 2019-08-31 17:45:11 +02:00 committed by Daniel Molkentin
parent 0a01086456
commit f39aa529c5
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,8 @@ NEWROOT=${NEWROOT:-"/sysroot"}

. /lib/dracut-lib.sh

mkdir -m 0700 /run/cryptsetup

# if device name is /dev/dm-X, convert to /dev/mapper/name
if [ "${1##/dev/dm-}" != "$1" ]; then
device="/dev/mapper/$(dmsetup info -c --noheadings -o name "$1")"