aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch
blob: 34e0620a1c1b6724e62ef8fb02ac6a5e9a1a8de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From ddf36613f3408ce42f15b03b4e9c6ad8478b97f8 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 2 Mar 2021 01:33:05 -0800
Subject: [PATCH] fix command /bin/findmnt, /bin/lsblk, /bin/sort not found

In oe-core (util-linux and coreutils), the commands locates in
${bindir} rather than /bin, add BINDIR to configure it

Upstream-Status: Inappropriate [oe specific]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 configure.ac                | 3 +++
 scripts/blkdeactivate.sh.in | 7 ++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4811d4a3d..137b31a82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1611,6 +1611,8 @@ fi
 
 SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
 
+BINDIR="$(eval echo $(eval echo $bindir))"
+
 SBINDIR="$(eval echo $(eval echo $sbindir))"
 LVM_PATH="$SBINDIR/lvm"
 AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.])
@@ -1829,6 +1831,7 @@ AC_SUBST(SACKPT_CFLAGS)
 AC_SUBST(SACKPT_LIBS)
 AC_SUBST(SALCK_CFLAGS)
 AC_SUBST(SALCK_LIBS)
+AC_SUBST(BINDIR)
 AC_SUBST(SBINDIR)
 AC_SUBST(SELINUX_LIBS)
 AC_SUBST(SELINUX_PC)
diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in
index 7c517b87b..7ef1bb766 100644
--- a/scripts/blkdeactivate.sh.in
+++ b/scripts/blkdeactivate.sh.in
@@ -42,13 +42,14 @@ VDO="/bin/vdo"
 
 sbindir="@SBINDIR@"
 DMSETUP="$sbindir/dmsetup"
+bindir="@BINDIR@"
 LVM="$sbindir/lvm"
 
 if "$UMOUNT" --help | grep -- "--all-targets" >"$DEV_DIR/null"; then
 	UMOUNT_OPTS="--all-targets "
 else
 	UMOUNT_OPTS=""
-	FINDMNT="/bin/findmnt -r --noheadings -u -o TARGET"
+	FINDMNT="$bindir/findmnt -r --noheadings -u -o TARGET"
 	FINDMNT_READ="read -r mnt"
 fi
 DMSETUP_OPTS=""
@@ -57,10 +58,10 @@ MDADM_OPTS=""
 MPATHD_OPTS=""
 VDO_OPTS=""
 
-LSBLK="/bin/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT"
+LSBLK="$bindir/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT"
 LSBLK_VARS="local devtype local kname local name local mnt"
 LSBLK_READ="read -r devtype kname name mnt"
-SORT_MNT="/bin/sort -r -u -k 4"
+SORT_MNT="$bindir/sort -r -u -k 4"
 
 # Do not show tool errors by default (only done/skipping summary
 # message provided by this script) and no verbose mode by default.
-- 
2.29.2