mirror of
https://github.com/troglobit/libuev.git
synced 2026-11-27 20:58:43 +00:00
Merge
This commit is contained in:
commit
c3bbb96ab3
1 file changed
+6
@@ -4,6 +4,7 @@ exec 1>/dev/console 2>&1
|
|||||||
|
|
||||||
P=/sys$DEVPATH
|
P=/sys$DEVPATH
|
||||||
[ -r $P/uevent ] && . $P/uevent
|
[ -r $P/uevent ] && . $P/uevent
|
||||||
|
[ -r $P/../../uevent ] && . $P/../../uevent
|
||||||
|
|
||||||
# Exit unless proper type
|
# Exit unless proper type
|
||||||
[ $SUBSYSTEM = "usb-serial" -a -n "$DRIVER" ] || exit 0
|
[ $SUBSYSTEM = "usb-serial" -a -n "$DRIVER" ] || exit 0
|
||||||
@@ -28,6 +29,11 @@ if [ $ACTION = "add" ] ;then
|
|||||||
mkdir -p $DEVP
|
mkdir -p $DEVP
|
||||||
ln -sf /dev/$MDEV $DEVP/$PORT
|
ln -sf /dev/$MDEV $DEVP/$PORT
|
||||||
say "Add $DEVP/$PORT -> /dev/$MDEV MANU $MANU"
|
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
|
elif [ $ACTION = "remove" ] ;then
|
||||||
rm -f /dev/ttyusb/$MANU/$DEV_NM/$PORT
|
rm -f /dev/ttyusb/$MANU/$DEV_NM/$PORT
|
||||||
say "Rem $DEVP/$PORT -> /dev/$MDEV MANU $MANU"
|
say "Rem $DEVP/$PORT -> /dev/$MDEV MANU $MANU"
|
||||||
|
|||||||
Reference in new issue
Block a user