Brad Bishop | c1d3433 | 2019-09-09 14:56:00 -0400 | [diff] [blame^] | 1 | From 27b56cb6b5dfc75ea8ddb395dc9ef41fb7a09c93 Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Mon, 2 Sep 2019 23:04:50 -0400 |
| 4 | Subject: [PATCH] fix command /bin/findmnt, /bin/lsblk, /bin/sort not found |
| 5 | |
| 6 | In oe-core (util-linux and coreutils), the commands locates in |
| 7 | ${bindir} rather than /bin, add BINDIR to configure it |
| 8 | |
| 9 | Upstream-Status: Inappropriate [oe specific] |
| 10 | |
| 11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 12 | --- |
| 13 | configure.ac | 3 +++ |
| 14 | scripts/blkdeactivate.sh.in | 7 ++++--- |
| 15 | 2 files changed, 7 insertions(+), 3 deletions(-) |
| 16 | |
| 17 | diff --git a/configure.ac b/configure.ac |
| 18 | index d1431e2..54e5a7b 100644 |
| 19 | --- a/configure.ac |
| 20 | +++ b/configure.ac |
| 21 | @@ -1495,6 +1495,8 @@ fi |
| 22 | |
| 23 | SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))" |
| 24 | |
| 25 | +BINDIR="$(eval echo $(eval echo $bindir))" |
| 26 | + |
| 27 | SBINDIR="$(eval echo $(eval echo $sbindir))" |
| 28 | LVM_PATH="$SBINDIR/lvm" |
| 29 | AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.]) |
| 30 | @@ -1721,6 +1723,7 @@ AC_SUBST(SACKPT_CFLAGS) |
| 31 | AC_SUBST(SACKPT_LIBS) |
| 32 | AC_SUBST(SALCK_CFLAGS) |
| 33 | AC_SUBST(SALCK_LIBS) |
| 34 | +AC_SUBST(BINDIR) |
| 35 | AC_SUBST(SBINDIR) |
| 36 | AC_SUBST(SELINUX_LIBS) |
| 37 | AC_SUBST(SELINUX_PC) |
| 38 | diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in |
| 39 | index a4b8a8f..3db4226 100644 |
| 40 | --- a/scripts/blkdeactivate.sh.in |
| 41 | +++ b/scripts/blkdeactivate.sh.in |
| 42 | @@ -41,13 +41,14 @@ UMOUNT="/bin/umount" |
| 43 | |
| 44 | sbindir="@SBINDIR@" |
| 45 | DMSETUP="$sbindir/dmsetup" |
| 46 | +bindir="@BINDIR@" |
| 47 | LVM="$sbindir/lvm" |
| 48 | |
| 49 | if "$UMOUNT" --help | grep -- "--all-targets" >"$DEV_DIR/null"; then |
| 50 | UMOUNT_OPTS="--all-targets " |
| 51 | else |
| 52 | UMOUNT_OPTS="" |
| 53 | - FINDMNT="/bin/findmnt -r --noheadings -u -o TARGET" |
| 54 | + FINDMNT="$bindir/findmnt -r --noheadings -u -o TARGET" |
| 55 | FINDMNT_READ="read -r mnt" |
| 56 | fi |
| 57 | DMSETUP_OPTS="" |
| 58 | @@ -55,10 +56,10 @@ LVM_OPTS="" |
| 59 | MDADM_OPTS="" |
| 60 | MPATHD_OPTS="" |
| 61 | |
| 62 | -LSBLK="/bin/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT" |
| 63 | +LSBLK="$bindir/lsblk -r --noheadings -o TYPE,KNAME,NAME,MOUNTPOINT" |
| 64 | LSBLK_VARS="local devtype local kname local name local mnt" |
| 65 | LSBLK_READ="read -r devtype kname name mnt" |
| 66 | -SORT_MNT="/bin/sort -r -u -k 4" |
| 67 | +SORT_MNT="$bindir/sort -r -u -k 4" |
| 68 | |
| 69 | # Do not show tool errors by default (only done/skipping summary |
| 70 | # message provided by this script) and no verbose mode by default. |
| 71 | -- |
| 72 | 2.8.1 |
| 73 | |