diff --git a/etc.armhf/udev/rules.d/99-com.rules b/etc.armhf/udev/rules.d/99-com.rules index 1931d3d..7ad5f38 100644 --- a/etc.armhf/udev/rules.d/99-com.rules +++ b/etc.armhf/udev/rules.d/99-com.rules @@ -17,11 +17,11 @@ SUBSYSTEM=="pwm", ACTION!="remove", PROGRAM="/bin/sh -c 'chgrp -R gpio /sys%p && KERNEL=="ttyAMA[0-9]*|ttyS[0-9]*", PROGRAM="/bin/sh -c '\ ALIASES=/proc/device-tree/aliases; \ TTYNODE=$$(readlink /sys/class/tty/%k/device/of_node | sed 's/base/:/' | cut -d: -f2); \ - if [ -e $$ALIASES/bluetooth ] && [ $$TTYNODE/bluetooth = $$(strings $$ALIASES/bluetooth) ]; then \ - echo 1; \ - elif [ -e $$ALIASES/console ]; then \ + if [ -e $$ALIASES/console ]; then \ if [ $$TTYNODE = $$(strings $$ALIASES/console) ]; then \ - echo 0;\ + echo 0; \ + elif [ -e $$ALIASES/bluetooth ] && [ $$TTYNODE/bluetooth = $$(strings $$ALIASES/bluetooth) ]; then \ + echo 1; \ else \ exit 1; \ fi \