Blob Blame History Raw
From fe02bc78accf4aaa39ab33adcdb5aaa71df90b30 Mon Sep 17 00:00:00 2001
From: Alexander Tsoy <alexander@tsoy.me>
Date: Sat, 23 May 2020 21:42:18 +0300
Subject: [PATCH] lvm: remove unnecessary ${initdir} from lvm_scan.sh

lvm_scan.sh runs in the initramfs, so paths should not be prefixed with
${initdir}.
---
 modules.d/90lvm/lvm_scan.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh
index 61a18b24..ff8e66e2 100755
--- a/modules.d/90lvm/lvm_scan.sh
+++ b/modules.d/90lvm/lvm_scan.sh
@@ -91,7 +91,7 @@ export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
 if [ -n "$SNAPSHOT" ] ; then
     # HACK - this should probably be done elsewhere or turned into a function
     # Enable read-write LVM locking
-    sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type =  1/' ${initdir}/etc/lvm/lvm.conf
+    sed -i -e 's/\(^[[:space:]]*\)locking_type[[:space:]]*=[[:space:]]*[[:digit:]]/\1locking_type =  1/' /etc/lvm/lvm.conf
 
     # Expected SNAPSHOT format "<orig lv name>:<snap lv name>"
     ORIG_LV=${SNAPSHOT%%:*}