diff --git a/nmeamux/root/etc/hotplug.d/usbtty/usbtty.hotplug b/nmeamux/root/etc/hotplug.d/usbtty/usbtty.hotplug index dbf7121..861835e 100755 --- a/nmeamux/root/etc/hotplug.d/usbtty/usbtty.hotplug +++ b/nmeamux/root/etc/hotplug.d/usbtty/usbtty.hotplug @@ -4,6 +4,7 @@ exec 1>/dev/console 2>&1 P=/sys$DEVPATH [ -r $P/uevent ] && . $P/uevent +[ -r $P/../../uevent ] && . $P/../../uevent # Exit unless proper type [ $SUBSYSTEM = "usb-serial" -a -n "$DRIVER" ] || exit 0 @@ -28,6 +29,11 @@ if [ $ACTION = "add" ] ;then mkdir -p $DEVP ln -sf /dev/$MDEV $DEVP/$PORT say "Add $DEVP/$PORT -> /dev/$MDEV MANU $MANU" + if [ -n $DEVNAME ] ;then + DEVADDR=$(echo $DEVNAME | tr / _) + ln -sf /dev/$MDEV $DEVP/$DEVADDR + say "Add $DEVP/$DEVADDR -> /dev/$MDEV MANU $MANU" + fi elif [ $ACTION = "remove" ] ;then rm -f /dev/ttyusb/$MANU/$DEV_NM/$PORT say "Rem $DEVP/$PORT -> /dev/$MDEV MANU $MANU"