xdp-tools: fix BPFTOOL detection

Fix sh syntax error in configure script.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2026-05-08 11:20:59 +08:00
parent fca51e2b2b
commit 2777fc61da
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=xdp-tools PKG_NAME:=xdp-tools
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_VERSION:=1.6.3 PKG_VERSION:=1.6.3
PKG_HASH:=78da363ff7dcf1a586f47800f16d644022bd33f3844864061a44616fce854fd8 PKG_HASH:=78da363ff7dcf1a586f47800f16d644022bd33f3844864061a44616fce854fd8
@@ -0,0 +1,16 @@
--- a/configure
+++ b/configure
@@ -109,11 +109,11 @@ check_toolchain()
exit 1
fi
- if ! command -v $BPFTOOL &>/dev/null; then
+ if ! command -v $BPFTOOL >/dev/null 2>&1; then
BPFTOOL=$(whereis -b bpftool | awk '{print $2}')
fi
- if command -v $BPFTOOL &>/dev/null && $BPFTOOL gen help 2>&1 | grep 'gen skeleton.*name' > /dev/null; then
+ if command -v $BPFTOOL >/dev/null 2>&1 && $BPFTOOL gen help 2>&1 | grep 'gen skeleton.*name' > /dev/null; then
bpftool_version=$($BPFTOOL version | head -n 1)
echo "using $bpftool_version"
else