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
|
From 2ff2a867db8d3e1c660d191a1805f9e355169c80 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 d9e7964c3..9dfdcfe01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1704,6 +1704,8 @@ AS_IF([test -n "$MODPROBE_CMD"], [
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.])
@@ -1944,6 +1946,7 @@ AC_SUBST(PYTHON2DIR)
AC_SUBST(PYTHON3)
AC_SUBST(PYTHON3DIR)
AC_SUBST(RT_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.
|