From: Olekhov Vasilii Date: Fri, 15 May 2026 17:02:36 +0000 (+0300) Subject: lpac: fix env vars for lpac.sh wrapper X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=6826a7fccc777825886d2f2d794450128ff88a78;p=openwrt-packages.git lpac: fix env vars for lpac.sh wrapper This patch fixes usage of `LPAC_QMI_DEV` and `LPAC_QMI_DEBUG` environment variables. OpenWRT upstream patch for `lpac` provides `uqmi` backend that uses these vars instead of `LPAC_APDU_QMI_DEVICE` and `LPAC_APDU_QMI_DEBUG` respectively. Added test-version.sh script since lpac version check is non-standart Signed-off-by: Olekhov Vasilii --- diff --git a/utils/lpac/Makefile b/utils/lpac/Makefile index a50a4f603..0a2cfab07 100644 --- a/utils/lpac/Makefile +++ b/utils/lpac/Makefile @@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lpac PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/estkme-group/lpac/tar.gz/refs/tags/v$(PKG_VERSION)? diff --git a/utils/lpac/files/lpac.sh b/utils/lpac/files/lpac.sh index db3a03f6f..5f8ccae78 100644 --- a/utils/lpac/files/lpac.sh +++ b/utils/lpac/files/lpac.sh @@ -28,8 +28,8 @@ if [ "$APDU_BACKEND" = "at" ]; then elif [ "$APDU_BACKEND" = "uqmi" ]; then UQMI_DEV="$(uci_get lpac uqmi device /dev/cdc-wdm0)" UQMI_DEBUG="$(uci_get lpac uqmi debug 0)" - export LPAC_APDU_QMI_DEVICE="$UQMI_DEV" - export LPAC_APDU_UQMI_DEBUG="$UQMI_DEBUG" + export LPAC_QMI_DEV="$UQMI_DEV" + export LPAC_QMI_DEBUG="$UQMI_DEBUG" elif [ "$APDU_BACKEND" = "mbim" ]; then MBIM_DEVICE="$(uci_get lpac mbim device /dev/cdc-wdm0)" MBIM_PROXY="$(uci_get lpac mbim proxy 1)" @@ -39,4 +39,11 @@ fi export LPAC_CUSTOM_ISD_R_AID="$CUSTOM_ISD_R_AID" +case "$1" in + -\?|--help|-h|-V|--version) + shift + exec /usr/lib/lpac version "$@" + ;; +esac + /usr/lib/lpac "$@" diff --git a/utils/lpac/test-version.sh b/utils/lpac/test-version.sh new file mode 100755 index 000000000..86b83a419 --- /dev/null +++ b/utils/lpac/test-version.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +[ "$1" = "lpac" ] && /usr/bin/lpac --version | grep -F '"code":0'