silent err if dbus absent

This commit is contained in:
Philippe Teuwen 2020-04-29 15:29:34 +02:00
parent 4c085245c5
commit ba08d5794c

2
pm3
View file

@ -67,7 +67,7 @@ function get_pm3_list_Linux {
if $FINDBTDIRECT; then
# check if the MAC of a Proxmark3 was registered in the known devices
MACS=()
for MAC in $(dbus-send --system --print-reply --type=method_call --dest='org.bluez' '/' org.freedesktop.DBus.ObjectManager.GetManagedObjects|\
for MAC in $(dbus-send --system --print-reply --type=method_call --dest='org.bluez' '/' org.freedesktop.DBus.ObjectManager.GetManagedObjects 2>/dev/null|\
awk '/"Address"/{getline;gsub(/"/,"",$3);a=$3}/Name/{getline;if (/PM3_RDV4/) print a}'); do
PM3LIST+=("bt:$MAC")
done