RPi-Distro / pi-bluetooth

Loads BCM43430A1 firmware on boot
42 stars 34 forks source link

udev rules have invalid substitution syntax #27

Closed mike-silva closed 2 years ago

mike-silva commented 3 years ago

On Pi 4b running Ubuntu 21.04 and pi-bluetooth/hirsute,now 0.1.15ubuntu2 arm64 the following warnings appear at boot:

systemd-udevd[976]: /usr/lib/udev/rules.d/90-pi-bluetooth.rules:14 Invalid value "/bin/sh -c 'ALIASES=/proc/device-tree/aliases; if cmp -s $ALIASES/uart0 $ALIASES/serial0; then echo 0;elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then echo 1; else exit 1; fi'" for PROGRAM (char 58: invalid substitution type), ignoring, but please fix it.

systemd-udevd[976]: /usr/lib/udev/rules.d/90-pi-bluetooth.rules:27 Invalid value "/bin/sh -c 'ALIASES=/proc/device-tree/aliases; if [ -e /dev/ttyAMA0 ]; then exit 1; elif cmp -s $ALIASES/uart0 $ALIASES/serial0; then echo 0;elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then echo 1; else exit 1; fi'" for PROGRAM (char 97: invalid substitution type), ignoring, but please fix it.

systemd-udevd[976]: /usr/lib/udev/rules.d/90-pi-bluetooth.rules:38 Invalid value "/bin/sh -c 'ALIASES=/proc/device-tree/aliases; if cmp -s $ALIASES/uart1 $ALIASES/serial0; then echo 0; elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then echo 1; else exit 1; fi '" for PROGRAM (char 58: invalid substitution type), ignoring, but please fix it.

pelwell commented 3 years ago

I wasn't expecting any substitution to happen in the command passed to /bin/sh, so ignoring the perceived error is the correct course of action. Perhaps there is a form of escaping that could be used to avoid the warning?

XECDesign commented 3 years ago

Ubuntu seems to have their own version of the package which is different from ours.