From 8560bd890993cb827552cb918b3b674eeb03f40f Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 4 Apr 2018 16:15:22 +0200 Subject: libusbgx: make conversion of product ID to decimal value portable Using "10#" to treat the product ID as a decimal value does not work with the BusyBox shell. Use eval productid + 0 which works well with bash and BusyBox to convert to a decimal value. Signed-off-by: Stefan Agner Acked-by: Marcel Ziswiler --- recipes-support/libusbgx/files/usbg.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-support/libusbgx/files/usbg.service b/recipes-support/libusbgx/files/usbg.service index 3955e38..c9ed582 100644 --- a/recipes-support/libusbgx/files/usbg.service +++ b/recipes-support/libusbgx/files/usbg.service @@ -6,7 +6,7 @@ Before=systemd-networkd.service [Service] Type=oneshot ExecStart=/usr/bin/gadget-import g1 /etc/usbg/g1.schema -ExecStartPost=/bin/sh -c '/bin/echo $((0x4000+10#$(cat /proc/device-tree/toradex,product-id))) > \ +ExecStartPost=/bin/sh -c '/bin/echo $((0x4000+$(expr $(cat /proc/device-tree/toradex,product-id) + 0))) > \ /sys/kernel/config/usb_gadget/g1/idProduct' ExecStartPost=/bin/sh -c '/bin/cat /proc/device-tree/serial-number > \ /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber' -- cgit v1.2.3