10894 questions

12980 answers

20232 comments

26393 members

0 votes
62 views 0 comments
by

Hello,

/etc/init.d/gpsd restart outputs ls: /sys/bus/usb/devices/3-1/3-1/tty/tty?*: No such file or directory. This is misleading there is no real error in fact. Fix it by adding a 2>/dev/null

--- gpsd-org	2022-04-25 22:30:07.000000000 +0200
+++ gpsd	2022-04-25 22:28:35.000000000 +0200
@@ -39,7 +39,7 @@
 		return
 	}
 
-	ttys=$(ls -d /sys/bus/usb/devices/$id/${id}*/tty?* /sys/bus/usb/devices/$id/${id}/tty/tty?* | sed "s/.*\///g" | tr "\n" " ")
+	ttys=$(ls -d /sys/bus/usb/devices/$id/${id}*/tty?* /sys/bus/usb/devices/$id/${id}/tty/tty?* 2>/dev/null | sed "s/.*\///g" | tr "\n" " ")
 	at_device=/dev/$(echo $ttys | cut -d" " -f $((gps + 1)))
 
 	[ -z "$at_device" ] && return

Regards,

1 Answer

0 votes
by
Hello,

Thank you for your observation. The issue is known and it should be resolved in the future firmware releases. However, other than the error message displayed, the service restart does execute and there is no negative impact on the overall system functionality.

Best, regards,

Žygimantas