From 03b0bba17cf848f91ee02cb27372cf15cb9b8c6f Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Thu, 29 Aug 2024 09:31:27 +0200 Subject: [PATCH] in hotplug.d/tty we already know it is a TTY device, so we do not need this check anymore --- .../files/etc/hotplug.d/tty/10-update-location-gps | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ffac-update-location-gps/files/etc/hotplug.d/tty/10-update-location-gps b/ffac-update-location-gps/files/etc/hotplug.d/tty/10-update-location-gps index 6ce23938..0cf0dc2c 100644 --- a/ffac-update-location-gps/files/etc/hotplug.d/tty/10-update-location-gps +++ b/ffac-update-location-gps/files/etc/hotplug.d/tty/10-update-location-gps @@ -1,17 +1,14 @@ #!/bin/sh -TTYPATH="/sys${DEVPATH}/tty" lockpath="/var/lock/hotplug-update-location-gps_${DEVNAME}.lock" if [ "${ACTION}" = "add" ]; then enabled=$(uci get update-location-gps.settings.enabled) [ "${enabled}" != "1" ] && exit 0 test -e "${lockpath}" && exit 0 - if test -e "${TTYPATH}"; then - echo "hotplug-update-location-gps: TTY device ${DEVNAME} was plugged in" > /dev/kmsg - echo "${DEVPATH}" > "${lockpath}" - echo "*/5 * * * * /usr/bin/update-location-gps /dev/${DEVNAME} | logger -t update-location-gps" > "/usr/lib/micron.d/update-location-gps_${DEVNAME}" - /etc/init.d/micrond restart - fi + echo "hotplug-update-location-gps: TTY device ${DEVNAME} was plugged in" > /dev/kmsg + echo "${DEVPATH}" > "${lockpath}" + echo "*/5 * * * * /usr/bin/update-location-gps /dev/${DEVNAME} | logger -t update-location-gps" > "/usr/lib/micron.d/update-location-gps_${DEVNAME}" + /etc/init.d/micrond restart fi if [ "${ACTION}" = "remove" ]; then