]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
crypt: create locking directory /run/cryptsetup
authorJonas Witschel <diabonas@gmx.de>
Sat, 31 Aug 2019 15:45:11 +0000 (17:45 +0200)
committerDaniel Molkentin <daniel@molkentin.de>
Tue, 3 Sep 2019 14:49:05 +0000 (16:49 +0200)
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.

modules.d/90crypt/cryptroot-ask.sh

index 33a823c7b1c4a2baa86da8610abb6b658dfee21f..e1f17975ef37b0b9cb3e0f04fcc51f98c236cd1f 100755 (executable)
@@ -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")"