dracut: patch mkdir warning in cryptroot-ask
This commit is contained in:
parent
7f3f0aa772
commit
c71ae43d39
@ -0,0 +1,39 @@
|
||||
From 2edc52848eaf2331cdcce64f92d8e76947c01a66 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
|
||||
<congdanhqx@gmail.com>
|
||||
Date: Sat, 14 Mar 2020 11:44:47 +0700
|
||||
Subject: [PATCH] cryptroot-ask: no warn if /run/cryptsetup exist
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In either case:
|
||||
- encrypted device is decrypted, udev will trigger device changes again,
|
||||
- multiple encrypted device,
|
||||
|
||||
cryptroot-ask will run multiple time, then report:
|
||||
> mkdir: cannot create directory '/run/cryptsetup': File exists
|
||||
|
||||
Pass `-p` into mkdir to ignore that warning.
|
||||
|
||||
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
|
||||
---
|
||||
modules.d/90crypt/cryptroot-ask.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git modules.d/90crypt/cryptroot-ask.sh modules.d/90crypt/cryptroot-ask.sh
|
||||
index e1f17975..97047ae9 100755
|
||||
--- modules.d/90crypt/cryptroot-ask.sh
|
||||
+++ modules.d/90crypt/cryptroot-ask.sh
|
||||
@@ -8,7 +8,7 @@ NEWROOT=${NEWROOT:-"/sysroot"}
|
||||
|
||||
. /lib/dracut-lib.sh
|
||||
|
||||
-mkdir -m 0700 /run/cryptsetup
|
||||
+mkdir -p -m 0700 /run/cryptsetup
|
||||
|
||||
# if device name is /dev/dm-X, convert to /dev/mapper/name
|
||||
if [ "${1##/dev/dm-}" != "$1" ]; then
|
||||
--
|
||||
2.26.0.rc1.191.g7acaab7404
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Template file for 'dracut'
|
||||
pkgname=dracut
|
||||
version=050
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --sysconfdir=/etc"
|
||||
conf_files="/etc/dracut.conf"
|
||||
|
Loading…
x
Reference in New Issue
Block a user