From fb253346c2fe85f8fdd49e5a66dff04d8f2bd53e Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 13 May 2021 11:15:47 +0800 Subject: 99-com.rules: fix error invalid substitution type fix below error: /etc/udev/rules.d/99-com.rules:10 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) Signed-off-by: Changqing Li --- recipes-core/udev/udev-rules-rpi/99-com.rules | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'recipes-core') diff --git a/recipes-core/udev/udev-rules-rpi/99-com.rules b/recipes-core/udev/udev-rules-rpi/99-com.rules index 6bf019b..ddd1e17 100644 --- a/recipes-core/udev/udev-rules-rpi/99-com.rules +++ b/recipes-core/udev/udev-rules-rpi/99-com.rules @@ -1,8 +1,8 @@ KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\ ALIASES=/proc/device-tree/aliases; \ - if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \ + if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \ echo 0;\ - elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \ + elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \ echo 1; \ else \ exit 1; \ @@ -11,9 +11,9 @@ KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\ KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\ ALIASES=/proc/device-tree/aliases; \ - if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \ + if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \ echo 0; \ - elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \ + elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \ echo 1; \ else \ exit 1; \ -- cgit v1.2.3-54-g00ecf