-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[console] udevprefix.conf not generated after plug-on usb console switch #5943
Comments
@sandycelestica could you take a look on this issue? |
This file depends on your udev rules design. Here is an example about how
to generate this file.
e.g:
ACTION=="add"
,KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProducc
t}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash -c
'/usr/local/bin/udev_prefii
x.sh C0-'",GOTO="C0 Add"
When the device is plugged in, "udev_prefix.sh" would be called .And in
udev_prefix.sh it would generate the udevprefix.conf.
Here is an example of udev_prefix.sh
*#!/bin/bashPREV_REBOOT_CAUSE="/host/reboot-cause/"DEVICE="/usr/share/sonic/device"PLATFORM=$(/usr/local/bin/sonic-cfggen
-H -v
DEVICE_METADATA.localhost.platform)FILES=$DEVICE/$PLATFORM/pluginsFILENAME="udevprefix.conf"if
[ "$1" = "clear" ]then if [ -e $FILES/$FILENAME ]; then
rm $FILES/$FILENAME fielse if [ -e $FILES/$FILENAME ];
then : > $FILES/$FILENAME echo -n "$1" >
$FILES/$FILENAME else touch $FILES/$FILENMAE
echo -n "$1" > $FILES/$FILENAME fifi*
…On Tue, Nov 17, 2020 at 2:20 PM Blueve ***@***.***> wrote:
@sandycelestica <https://github.com/sandycelestica> could you take a look
on this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDSWE5TGY4LTXJLOTEDSQIIZRANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
Hi Sandy, we are using the rule you provided(https://github.com/sandycelestica/sonic-buildimage/blob/master/platform/broadcom/sonic-platform-modules-cel/haliburton/script/50-ttyUSB-C0.rules), seems like the script were not executed when plugged in. But the following SYMLINK added successfully. This issue can be repro on my testbed, is possible to test it on your side? |
I tested this before I upload the code. If needed I could set up the environment to reproduce this issue. |
Yeah. Seems like both LN11 and LN12(https://github.com/sandycelestica/sonic-buildimage/blob/master/platform/broadcom/sonic-platform-modules-cel/haliburton/script/50-ttyUSB-C0.rules#L11,L12) in the rule are not working as expect, but others works fine. Could you please try below steps on your side?
Ensure there are no
And the udevprefix.rule file not generated in below folder.
|
Thanks.I got your log info and tried to reproduce on my site but each time
the file can be generated automatically.
Since udevprefix.conf depends on 50-ttyUSB-C0.rules and udev_prefix.sh .
Could you help to provide me with the below log info so that I can check
the files are the right?
1.cat /etc/udev/rules.d/50-ttyUSB-C0.rules
2.cat /usr/local/bin/udev_prefix.sh
If convenient you can add some debug info in /usr/local/bin/
udev_prefix.sh to make sure this script been executed. Or is it possible I
can log in your e1031?
Here is the log info I just run.
admin@sonic:~$ ls /dev/C0*
ls: cannot access '/dev/C0*': No such file or directory
admin@sonic:~$ ls /usr/share/sonic/device/x86_64-cel_e1031-r0/plugins/
consutil.py eeprom.py eeprom.pyc psuutil.py sfputil.py test.log
test.log_ok test.py
admin@sonic:~$
##Plug in the C0
admin@sonic:~$ ls /dev/C0*
/dev/C0-1 /dev/C0-13 /dev/C0-17 /dev/C0-20 /dev/C0-24 /dev/C0-28
/dev/C0-31 /dev/C0-35 /dev/C0-39 /dev/C0-42 /dev/C0-46 /dev/C0-6
/dev/C0-10 /dev/C0-14 /dev/C0-18 /dev/C0-21 /dev/C0-25 /dev/C0-29
/dev/C0-32 /dev/C0-36 /dev/C0-4 /dev/C0-43 /dev/C0-47 /dev/C0-7
/dev/C0-11 /dev/C0-15 /dev/C0-19 /dev/C0-22 /dev/C0-26 /dev/C0-3
/dev/C0-33 /dev/C0-37 /dev/C0-40 /dev/C0-44 /dev/C0-48 /dev/C0-8
/dev/C0-12 /dev/C0-16 /dev/C0-2 /dev/C0-23 /dev/C0-27 /dev/C0-30
/dev/C0-34 /dev/C0-38 /dev/C0-41 /dev/C0-45 /dev/C0-5 /dev/C0-9
admin@sonic:~$
admin@sonic:~$ ls /usr/share/sonic/device/x86_64-cel_e1031-r0/plugins/
consutil.py eeprom.py eeprom.pyc psuutil.py sfputil.py test.log
test.log_ok test.py udevprefix.conf
admin@sonic:~$ ls /usr/local/bin/udev_prefix.sh
/usr/local/bin/udev_prefix.sh
admin@sonic:~$ cat /usr/local/bin/udev_prefix.sh
#!/bin/bash
PREV_REBOOT_CAUSE="/host/reboot-cause/"
DEVICE="/usr/share/sonic/device"
PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v
DEVICE_METADATA.localhost.platform)
FILES=$DEVICE/$PLATFORM/plugins
FILENAME="udevprefix.conf"
if [ "$1" = "clear" ]
then
##cleart
if [ -e $FILES/$FILENAME ]; then
rm $FILES/$FILENAME
fi
else
if [ -e $FILES/$FILENAME ]; then
: > $FILES/$FILENAME
echo -n "$1" > $FILES/$FILENAME
else
touch $FILES/$FILENMAE
echo -n "$1" > $FILES/$FILENAME
fi
fi
admin@sonic:~$
…On Wed, Nov 18, 2020 at 1:10 PM Blueve ***@***.***> wrote:
I tested this before I upload the code. If needed I could set up the
environment to reproduce this issue.
Could you please share with me the test log? Including "ls /dev/*",
"lsusb" ,"lsusb -t"
Yeah. Seems like both LN11 and LN12(
https://github.com/sandycelestica/sonic-buildimage/blob/master/platform/broadcom/sonic-platform-modules-cel/haliburton/script/50-ttyUSB-C0.rules#L11,L12)
in the rule are not working as expect, but others works fine.
Could you please try below steps on your side?
1. Unplug the usb connection between E1031 and console switch
***@***.***:~$ ls /dev/*
/dev/autofs /dev/linux-bcm-bde /dev/loop7 /dev/random /dev/stdout /dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61 /dev/urandom /dev/vcsa4 /dev/vhost-net
/dev/btrfs-control /dev/linux-bcm-knet /dev/loop-control /dev/rfkill /dev/tty /dev/tty19 /dev/tty3 /dev/tty40 /dev/tty51 /dev/tty62 /dev/vcs /dev/vcsa5 /dev/vhost-vsock
/dev/console /dev/linux-kernel-bde /dev/mem /dev/rtc /dev/tty0 /dev/tty2 /dev/tty30 /dev/tty41 /dev/tty52 /dev/tty63 /dev/vcs1 /dev/vcsa6 /dev/watchdog
/dev/core /dev/linux-knet-cb /dev/memory_bandwidth /dev/rtc0 /dev/tty1 /dev/tty20 /dev/tty31 /dev/tty42 /dev/tty53 /dev/tty7 /dev/vcs2 /dev/vcsu /dev/watchdog0
/dev/cpu_dma_latency /dev/log /dev/network_latency /dev/sda /dev/tty10 /dev/tty21 /dev/tty32 /dev/tty43 /dev/tty54 /dev/tty8 /dev/vcs3 /dev/vcsu1 /dev/zero
/dev/cuse /dev/loop0 /dev/network_throughput /dev/sda1 /dev/tty11 /dev/tty22 /dev/tty33 /dev/tty44 /dev/tty55 /dev/tty9 /dev/vcs4 /dev/vcsu2
/dev/full /dev/loop1 /dev/null /dev/sda2 /dev/tty12 /dev/tty23 /dev/tty34 /dev/tty45 /dev/tty56 /dev/ttyS0 /dev/vcs5 /dev/vcsu3
/dev/fuse /dev/loop2 /dev/port /dev/sda3 /dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyS1 /dev/vcs6 /dev/vcsu4
/dev/hpet /dev/loop3 /dev/ppp /dev/sg0 /dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58 /dev/ttyS2 /dev/vcsa /dev/vcsu5
/dev/initctl /dev/loop4 /dev/psaux /dev/snapshot /dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59 /dev/ttyS3 /dev/vcsa1 /dev/vcsu6
/dev/kmsg /dev/loop5 /dev/ptmx /dev/stderr /dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6 /dev/uhid /dev/vcsa2 /dev/vga_arbiter
/dev/kvm /dev/loop6 /dev/ptp0 /dev/stdin /dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60 /dev/uinput /dev/vcsa3 /dev/vhci
/dev/block:
7:0 7:1 7:2 7:3 7:4 7:5 7:6 7:7 8:0 8:1 8:2 8:3
/dev/bsg:
0:0:0:0
/dev/bus:
usb
/dev/char:
10:1 10:231 10:59 10:63 13:63 1:5 189:1 248:0 4:1 4:13 4:17 4:20 4:24 4:28 4:31 4:35 4:39 4:42 4:46 4:5 4:53 4:57 4:60 4:64 4:7 5:1 7:128 7:132 7:3 7:64 7:68
10:130 10:232 10:60 1:1 13:64 1:7 1:9 249:0 4:10 4:14 4:18 4:21 4:25 4:29 4:32 4:36 4:4 4:43 4:47 4:50 4:54 4:58 4:61 4:65 4:8 5:2 7:129 7:133 7:4 7:65 7:69
10:184 10:235 10:61 1:11 13:65 1:8 21:0 252:0 4:11 4:15 4:19 4:22 4:26 4:3 4:33 4:37 4:40 4:44 4:48 4:51 4:55 4:59 4:62 4:66 4:9 7:0 7:130 7:134 7:5 7:66 7:70
10:228 10:237 10:62 1:3 1:4 189:0 247:0 4:0 4:12 4:16 4:2 4:23 4:27 4:30 4:34 4:38 4:41 4:45 4:49 4:52 4:56 4:6 4:63 4:67 5:0 7:1 7:131 7:2 7:6 7:67
/dev/cpu:
microcode
/dev/disk:
by-id by-label by-partlabel by-partuuid by-path by-uuid
/dev/fd:
0 1 2 3
/dev/hugepages:
/dev/input:
by-path event0 event1 mice
/dev/mapper:
control
/dev/mqueue:
/dev/net:
tun
/dev/pts:
0 ptmx
/dev/shm:
/dev/snd:
seq timer
/dev/vfio:
vfio
***@***.***:~$ lsusb
Bus 001 Device 002: ID 8087:07db Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
***@***.***:~$ lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
Ensure there are no udevprefix.rule file exists in plugins folder at this
moment.
***@***.***:~$ ls /usr/share/sonic/device/x86_64-cel_e1031-r0/plugins/
eeprom.py eeprom.pyc pcie.yaml psuutil.py sfputil.py
1. Plug in the console switch and wait for 1 minute
***@***.***:~$ ls /dev/*
/dev/autofs /dev/C0-27 /dev/C0-46 /dev/linux-knet-cb /dev/random /dev/tty15 /dev/tty34 /dev/tty53 /dev/ttyUSB10 /dev/ttyUSB3 /dev/ttyUSB6 /dev/vcsu
/dev/btrfs-control /dev/C0-28 /dev/C0-47 /dev/log /dev/rfkill /dev/tty16 /dev/tty35 /dev/tty54 /dev/ttyUSB11 /dev/ttyUSB30 /dev/ttyUSB7 /dev/vcsu1
/dev/C0-1 /dev/C0-29 /dev/C0-48 /dev/loop0 /dev/rtc /dev/tty17 /dev/tty36 /dev/tty55 /dev/ttyUSB12 /dev/ttyUSB31 /dev/ttyUSB8 /dev/vcsu2
/dev/C0-10 /dev/C0-3 /dev/C0-5 /dev/loop1 /dev/rtc0 /dev/tty18 /dev/tty37 /dev/tty56 /dev/ttyUSB13 /dev/ttyUSB32 /dev/ttyUSB9 /dev/vcsu3
/dev/C0-11 /dev/C0-30 /dev/C0-6 /dev/loop2 /dev/sda /dev/tty19 /dev/tty38 /dev/tty57 /dev/ttyUSB14 /dev/ttyUSB33 /dev/uhid /dev/vcsu4
/dev/C0-12 /dev/C0-31 /dev/C0-7 /dev/loop3 /dev/sda1 /dev/tty2 /dev/tty39 /dev/tty58 /dev/ttyUSB15 /dev/ttyUSB34 /dev/uinput /dev/vcsu5
/dev/C0-13 /dev/C0-32 /dev/C0-8 /dev/loop4 /dev/sda2 /dev/tty20 /dev/tty4 /dev/tty59 /dev/ttyUSB16 /dev/ttyUSB35 /dev/urandom /dev/vcsu6
/dev/C0-14 /dev/C0-33 /dev/C0-9 /dev/loop5 /dev/sda3 /dev/tty21 /dev/tty40 /dev/tty6 /dev/ttyUSB17 /dev/ttyUSB36 /dev/vcs /dev/vga_arbiter
/dev/C0-15 /dev/C0-34 /dev/console /dev/loop6 /dev/sg0 /dev/tty22 /dev/tty41 /dev/tty60 /dev/ttyUSB18 /dev/ttyUSB37 /dev/vcs1 /dev/vhci
/dev/C0-16 /dev/C0-35 /dev/core /dev/loop7 /dev/snapshot /dev/tty23 /dev/tty42 /dev/tty61 /dev/ttyUSB19 /dev/ttyUSB38 /dev/vcs2 /dev/vhost-net
/dev/C0-17 /dev/C0-36 /dev/cpu_dma_latency /dev/loop-control /dev/stderr /dev/tty24 /dev/tty43 /dev/tty62 /dev/ttyUSB2 /dev/ttyUSB39 /dev/vcs3 /dev/vhost-vsock
/dev/C0-18 /dev/C0-37 /dev/cuse /dev/mem /dev/stdin /dev/tty25 /dev/tty44 /dev/tty63 /dev/ttyUSB20 /dev/ttyUSB4 /dev/vcs4 /dev/watchdog
/dev/C0-19 /dev/C0-38 /dev/full /dev/memory_bandwidth /dev/stdout /dev/tty26 /dev/tty45 /dev/tty7 /dev/ttyUSB21 /dev/ttyUSB40 /dev/vcs5 /dev/watchdog0
/dev/C0-2 /dev/C0-39 /dev/fuse /dev/network_latency /dev/tty /dev/tty27 /dev/tty46 /dev/tty8 /dev/ttyUSB22 /dev/ttyUSB41 /dev/vcs6 /dev/zero
/dev/C0-20 /dev/C0-4 /dev/hpet /dev/network_throughput /dev/tty0 /dev/tty28 /dev/tty47 /dev/tty9 /dev/ttyUSB23 /dev/ttyUSB42 /dev/vcsa
/dev/C0-21 /dev/C0-40 /dev/initctl /dev/null /dev/tty1 /dev/tty29 /dev/tty48 /dev/ttyS0 /dev/ttyUSB24 /dev/ttyUSB43 /dev/vcsa1
/dev/C0-22 /dev/C0-41 /dev/kmsg /dev/port /dev/tty10 /dev/tty3 /dev/tty49 /dev/ttyS1 /dev/ttyUSB25 /dev/ttyUSB44 /dev/vcsa2
/dev/C0-23 /dev/C0-42 /dev/kvm /dev/ppp /dev/tty11 /dev/tty30 /dev/tty5 /dev/ttyS2 /dev/ttyUSB26 /dev/ttyUSB45 /dev/vcsa3
/dev/C0-24 /dev/C0-43 /dev/linux-bcm-bde /dev/psaux /dev/tty12 /dev/tty31 /dev/tty50 /dev/ttyS3 /dev/ttyUSB27 /dev/ttyUSB46 /dev/vcsa4
/dev/C0-25 /dev/C0-44 /dev/linux-bcm-knet /dev/ptmx /dev/tty13 /dev/tty32 /dev/tty51 /dev/ttyUSB0 /dev/ttyUSB28 /dev/ttyUSB47 /dev/vcsa5
/dev/C0-26 /dev/C0-45 /dev/linux-kernel-bde /dev/ptp0 /dev/tty14 /dev/tty33 /dev/tty52 /dev/ttyUSB1 /dev/ttyUSB29 /dev/ttyUSB5 /dev/vcsa6
/dev/block:
7:0 7:1 7:2 7:3 7:4 7:5 7:6 7:7 8:0 8:1 8:2 8:3
/dev/bsg:
0:0:0:0
/dev/bus:
usb
/dev/char:
10:1 10:237 1:11 1:7 188:13 188:2 188:26 188:32 188:39 188:45 188:9 189:20 189:27 249:0 4:13 4:2 4:26 4:32 4:39 4:45 4:51 4:58 4:64 5:0 7:130 7:4 7:68
10:130 10:59 1:3 1:8 188:14 188:20 188:27 188:33 188:4 188:46 189:0 189:21 189:28 252:0 4:14 4:20 4:27 4:33 4:4 4:46 4:52 4:59 4:65 5:1 7:131 7:5 7:69
10:184 10:60 13:63 188:0 188:15 188:21 188:28 188:34 188:40 188:47 189:1 189:22 189:29 4:0 4:15 4:21 4:28 4:34 4:40 4:47 4:53 4:6 4:66 5:2 7:132 7:6 7:70
10:228 10:61 13:64 188:1 188:16 188:22 188:29 188:35 188:41 188:5 189:16 189:23 1:9 4:1 4:16 4:22 4:29 4:35 4:41 4:48 4:54 4:60 4:67 7:0 7:133 7:64
10:231 10:62 13:65 188:10 188:17 188:23 188:3 188:36 188:42 188:6 189:17 189:24 21:0 4:10 4:17 4:23 4:3 4:36 4:42 4:49 4:55 4:61 4:7 7:1 7:134 7:65
10:232 10:63 1:4 188:11 188:18 188:24 188:30 188:37 188:43 188:7 189:18 189:25 247:0 4:11 4:18 4:24 4:30 4:37 4:43 4:5 4:56 4:62 4:8 7:128 7:2 7:66
10:235 1:1 1:5 188:12 188:19 188:25 188:31 188:38 188:44 188:8 189:19 189:26 248:0 4:12 4:19 4:25 4:31 4:38 4:44 4:50 4:57 4:63 4:9 7:129 7:3 7:67
/dev/cpu:
microcode
/dev/disk:
by-id by-label by-partlabel by-partuuid by-path by-uuid
/dev/fd:
0 1 2 3
/dev/hugepages:
/dev/input:
by-path event0 event1 mice
/dev/mapper:
control
/dev/mqueue:
/dev/net:
tun
/dev/pts:
0 ptmx
/dev/serial:
by-id by-path
/dev/shm:
/dev/snd:
seq timer
/dev/vfio:
vfio
***@***.***:~$ lsusb
Bus 001 Device 030: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 029: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 028: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 027: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 026: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 025: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 024: ID 0424:2517 Standard Microsystems Corp. Hub
Bus 001 Device 023: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 022: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 021: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 020: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 019: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 018: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 017: ID 0424:2517 Standard Microsystems Corp. Hub
Bus 001 Device 002: ID 8087:07db Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
***@***.***:~$ lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 17, If 0, Class=Hub, Driver=hub/7p, 480M
|__ Port 1: Dev 18, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 1: Dev 18, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 1: Dev 18, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 1: Dev 18, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 2: Dev 19, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 2: Dev 19, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 2: Dev 19, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 2: Dev 19, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 3: Dev 20, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 3: Dev 20, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 3: Dev 20, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 3: Dev 20, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 4: Dev 21, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 4: Dev 21, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 4: Dev 21, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 4: Dev 21, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 5: Dev 22, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 5: Dev 22, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 5: Dev 22, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 5: Dev 22, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 6: Dev 23, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 6: Dev 23, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 6: Dev 23, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 6: Dev 23, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 7: Dev 24, If 0, Class=Hub, Driver=hub/7p, 480M
|__ Port 5: Dev 29, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 5: Dev 29, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 5: Dev 29, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 5: Dev 29, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 3: Dev 27, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 3: Dev 27, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 3: Dev 27, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 3: Dev 27, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 1: Dev 25, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 1: Dev 25, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 1: Dev 25, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 1: Dev 25, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 6: Dev 30, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 6: Dev 30, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 6: Dev 30, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 6: Dev 30, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 4: Dev 28, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 4: Dev 28, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 4: Dev 28, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 4: Dev 28, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 2: Dev 26, If 1, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 2: Dev 26, If 2, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 2: Dev 26, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
|__ Port 2: Dev 26, If 3, Class=Vendor Specific Class, Driver=cp210x, 12M
And the udevprefix.rule file not generated in below folder.
***@***.***:~$ ls /usr/share/sonic/device/x86_64-cel_e1031-r0/plugins/
eeprom.py eeprom.pyc pcie.yaml psuutil.py sfputil.py
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDUODP22UPEJ33CBPULSQNJM7ANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
@sandycelestica Thanks for your quick response!
I will try add something to this script tomorrow and get back to you.
|
Yes,It matches the rules.See below:
ACTION=="add",KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash
-c '/usr/local/bin/udev_prefix.sh C0-'",GOTO="C0 Add"
Then please help to add some debug info in udev_prefix.sh to make sure
this script has been executed. Any update please let me know. Thanks.
…On Wed, Nov 18, 2020 at 4:15 PM Blueve ***@***.***> wrote:
@sandycelestica <https://github.com/sandycelestica> Thanks for your quick
response!
***@***.***:~$ cat /etc/udev/rules.d/50-ttyUSB-C0.rules
#ACTION=="add",KERNELS=="ttyUSB0",SUBSYSTEMS=="usb-serial",DRIVERS=="cp210x",ATTRS{port_number}=="0",NAME="ttyUSB30",SYMLINK="ttyUSB30"
#ACTION=="add",RUN+="/bin/mkdir test.txt"
#KERNELS=="1-1.1.3",ATTRS{devpath}=="1.1.3",ATTRS{idProduct}=="2303",ATTRS{idVendor}=="067b",SYMLINK+="ttypl2303-%n"
#ACTION=="add",KERNELS=="1-1.1.3",ATTRS{devpath}=="1.1.3",ATTRS{idProduct}=="2303",ATTRS{idVendor}=="067b",SYMLINK+="ttypl2303",RUN+="/bin/mkdir 123.txt"
LABEL="parent info"
ACTION=="add",KERNEL=="1-1",SUBSYSTEM=="usb",RUN+="/bin/bash -c '/usr/local/bin/udev_prefix.sh clear'"
#ACTION=="add",KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash -c '/usr/local/bin popmsg.sh 0'",RUN+="/bin/bash -c '/usr/local/bin udev_prefix.sh C0-'",GOTO="C0 Add"
ACTION=="add",KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash -c '/usr/local/bin/udev_prefix.sh C0-'",GOTO="C0 Add"
ACTION=="remove",KERNELS=="1-1.1",ENV{PRODUCT}=="*424/2517/*",RUN+="/bin/bash -c '/usr/local/bin/udev_prefix.sh clear'",GOTO="C0 Remove"
LABEL="C0 Add"
ACTION=="add",KERNELS=="1-1.1.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-1",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-2",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-3",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-4",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-5",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-6",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-7",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-8",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-9",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-10",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-11",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-12",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-13",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-14",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-15",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-16",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-17",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-18",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-19",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-20",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-21",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-22",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-23",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-24",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-25",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-26",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-27",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-28",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-29",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-30",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-31",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-32",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-33",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-34",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-35",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-36",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-37",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-38",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-39",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-40",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-41",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-42",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-43",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-44",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",SYMLINK+="C0-45",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",SYMLINK+="C0-46",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",SYMLINK+="C0-47",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",SYMLINK+="C0-48",MODE="0666"
LABEL="C0 Remove"
ACTION=="remove",KERNELS=="1-1.1.1:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 1'"
ACTION=="remove",KERNELS=="1-1.1.1:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 2'"
ACTION=="remove",KERNELS=="1-1.1.1:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 3'"
ACTION=="remove",KERNELS=="1-1.1.1:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 4'"
ACTION=="remove",KERNELS=="1-1.1.2:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 5'"
ACTION=="remove",KERNELS=="1-1.1.2:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 6'"
ACTION=="remove",KERNELS=="1-1.1.2:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 7'"
ACTION=="remove",KERNELS=="1-1.1.2:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 8'"
ACTION=="remove",KERNELS=="1-1.1.3:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 9'"
ACTION=="remove",KERNELS=="1-1.1.3:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 10'"
ACTION=="remove",KERNELS=="1-1.1.3:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 11'"
ACTION=="remove",KERNELS=="1-1.1.3:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash -c '/usr/local/bin/popmsg.sh 12'"
ACTION=="remove",KERNELS=="1-1.1.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 13"
ACTION=="remove",KERNELS=="1-1.1.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 14"
ACTION=="remove",KERNELS=="1-1.1.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 15"
ACTION=="remove",KERNELS=="1-1.1.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 16"
ACTION=="remove",KERNELS=="1-1.1.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 17"
ACTION=="remove",KERNELS=="1-1.1.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 18"
ACTION=="remove",KERNELS=="1-1.1.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 19"
ACTION=="remove",KERNELS=="1-1.1.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 20"
ACTION=="remove",KERNELS=="1-1.1.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 21"
ACTION=="remove",KERNELS=="1-1.1.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 22"
ACTION=="remove",KERNELS=="1-1.1.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 23"
ACTION=="remove",KERNELS=="1-1.1.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 24"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 25"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 26"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 27"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 28"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 29"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 30"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 31"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 32"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 33"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 34"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 35"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 36"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 37"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 38"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 39"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 40"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 41"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 42"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 43"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 44"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108 Interface 0",RUN+="/usr/local/bin/popmsg.sh 45"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108 Interface 1",RUN+="/usr/local/bin/popmsg.sh 46"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108 Interface 2",RUN+="/usr/local/bin/popmsg.sh 47"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108 Interface 3",RUN+="/usr/local/bin/popmsg.sh 48"
***@***.***:~$ cat /usr/local/bin/udev_prefix.sh
#!/bin/bash
PREV_REBOOT_CAUSE="/host/reboot-cause/"
DEVICE="/usr/share/sonic/device"
PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
FILES=$DEVICE/$PLATFORM/plugins
FILENAME="udevprefix.conf"
if [ "$1" = "clear" ]
then
if [ -e $FILES/$FILENAME ]; then
rm $FILES/$FILENAME
fi
else
if [ -e $FILES/$FILENAME ]; then
: > $FILES/$FILENAME
echo -n "$1" > $FILES/$FILENAME
else
touch $FILES/$FILENMAE
echo -n "$1" > $FILES/$FILENAME
fi
fi
I will try add something to this script tomorrow and get back to you.
I was wondering if there a hardware different or something cause this
problem?
Here is my udev detail for ttyUSB0, but I think it should match the
rule...
***@***.***:~$ udevadm info -a -n /dev/ttyUSB0
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/ttyUSB0/tty/ttyUSB0':
KERNEL=="ttyUSB0"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/ttyUSB0':
KERNELS=="ttyUSB0"
SUBSYSTEMS=="usb-serial"
DRIVERS=="cp210x"
ATTRS{port_number}=="0"
looking at parent device '/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0':
KERNELS=="1-1.1.1:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="cp210x"
ATTRS{interface}=="CP2108 Interface 0"
ATTRS{authorized}=="1"
ATTRS{bInterfaceClass}=="ff"
ATTRS{bNumEndpoints}=="02"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
ATTRS{supports_autosuspend}=="1"
ATTRS{bInterfaceProtocol}=="00"
ATTRS{bInterfaceSubClass}=="00"
looking at parent device '/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1':
KERNELS=="1-1.1.1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{maxchild}=="0"
ATTRS{manufacturer}=="Silicon Labs"
ATTRS{speed}=="12"
ATTRS{rx_lanes}=="1"
ATTRS{bDeviceProtocol}=="00"
ATTRS{idProduct}=="ea71"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bcdDevice}=="0100"
ATTRS{bDeviceSubClass}=="00"
ATTRS{removable}=="unknown"
ATTRS{configuration}==""
ATTRS{bNumConfigurations}=="1"
ATTRS{authorized}=="1"
ATTRS{devpath}=="1.1.1"
ATTRS{bMaxPower}=="100mA"
ATTRS{bConfigurationValue}=="1"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="CP2108 Quad USB to UART Bridge"
ATTRS{urbnum}=="37"
ATTRS{tx_lanes}=="1"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="0001"
ATTRS{idVendor}=="10c4"
ATTRS{ltm_capable}=="no"
ATTRS{bNumInterfaces}==" 4"
ATTRS{devnum}=="18"
ATTRS{bmAttributes}=="80"
ATTRS{version}==" 2.00"
ATTRS{busnum}=="1"
looking at parent device '/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1':
KERNELS=="1-1.1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{idProduct}=="2517"
ATTRS{manufacturer}=="Celestica"
ATTRS{speed}=="480"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{removable}=="unknown"
ATTRS{serial}=="C1010NNN010A22BY200022"
ATTRS{bMaxPower}=="2mA"
ATTRS{busnum}=="1"
ATTRS{urbnum}=="94"
ATTRS{idVendor}=="0424"
ATTRS{maxchild}=="7"
ATTRS{bDeviceSubClass}=="00"
ATTRS{version}==" 2.00"
ATTRS{tx_lanes}=="1"
ATTRS{devnum}=="17"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{ltm_capable}=="no"
ATTRS{bConfigurationValue}=="1"
ATTRS{rx_lanes}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bDeviceProtocol}=="02"
ATTRS{quirks}=="0x0"
ATTRS{bDeviceClass}=="09"
ATTRS{bcdDevice}=="0000"
ATTRS{devpath}=="1.1"
ATTRS{authorized}=="1"
ATTRS{product}=="C1010"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bNumConfigurations}=="1"
looking at parent device '/devices/pci0000:00/0000:00:16.0/usb1/1-1':
KERNELS=="1-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bNumInterfaces}==" 1"
ATTRS{busnum}=="1"
ATTRS{configuration}==""
ATTRS{authorized}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="4"
ATTRS{removable}=="unknown"
ATTRS{idVendor}=="8087"
ATTRS{idProduct}=="07db"
ATTRS{bmAttributes}=="e0"
ATTRS{quirks}=="0x0"
ATTRS{bcdDevice}=="0003"
ATTRS{ltm_capable}=="no"
ATTRS{bMaxPower}=="0mA"
ATTRS{rx_lanes}=="1"
ATTRS{bDeviceProtocol}=="01"
ATTRS{speed}=="480"
ATTRS{bConfigurationValue}=="1"
ATTRS{devnum}=="2"
ATTRS{urbnum}=="54"
ATTRS{bDeviceClass}=="09"
ATTRS{devpath}=="1"
ATTRS{bNumConfigurations}=="1"
ATTRS{bDeviceSubClass}=="00"
ATTRS{tx_lanes}=="1"
ATTRS{avoid_reset_quirk}=="0"
looking at parent device '/devices/pci0000:00/0000:00:16.0/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{maxchild}=="8"
ATTRS{urbnum}=="36"
ATTRS{serial}=="0000:00:16.0"
ATTRS{devnum}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{interface_authorized_default}=="1"
ATTRS{busnum}=="1"
ATTRS{authorized}=="1"
ATTRS{configuration}==""
ATTRS{idVendor}=="1d6b"
ATTRS{tx_lanes}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bmAttributes}=="e0"
ATTRS{manufacturer}=="Linux 4.19.0-9-2-amd64 ehci_hcd"
ATTRS{rx_lanes}=="1"
ATTRS{bDeviceClass}=="09"
ATTRS{bConfigurationValue}=="1"
ATTRS{speed}=="480"
ATTRS{devpath}=="0"
ATTRS{bDeviceProtocol}=="00"
ATTRS{removable}=="unknown"
ATTRS{bNumConfigurations}=="1"
ATTRS{quirks}=="0x0"
ATTRS{bcdDevice}=="0419"
ATTRS{authorized_default}=="1"
ATTRS{bDeviceSubClass}=="00"
ATTRS{idProduct}=="0002"
ATTRS{version}==" 2.00"
ATTRS{product}=="EHCI Host Controller"
ATTRS{bMaxPower}=="0mA"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{ltm_capable}=="no"
looking at parent device '/devices/pci0000:00/0000:00:16.0':
KERNELS=="0000:00:16.0"
SUBSYSTEMS=="pci"
DRIVERS=="ehci-pci"
ATTRS{driver_override}=="(null)"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="3"
ATTRS{device}=="0x1f2c"
ATTRS{subsystem_device}=="0x7270"
ATTRS{class}=="0x0c0320"
ATTRS{uframe_periodic_max}=="100"
ATTRS{ari_enabled}=="0"
ATTRS{revision}=="0x03"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="1"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{vendor}=="0x8086"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{irq}=="23"
ATTRS{subsystem_vendor}=="0x8086"
ATTRS{local_cpulist}=="0-1"
ATTRS{companion}==""
ATTRS{msi_bus}=="1"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDT5JA2AUZDZZDGVOLLSQN7BDANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
I tried let the script output something to a file but no luck. Seems like these two rules are not triggered... |
We have tried the 201911 and 201811 branch.
For master 492 could you share with me the image.As we build it may need
more time.
…On Thu, Nov 19, 2020 at 2:12 PM Blueve ***@***.***> wrote:
Yes,It matches the rules.See below:
ACTION=="add",KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash
-c '/usr/local/bin/udev_prefix.sh C0-'",GOTO="C0 Add" Then please help to
add some debug info in udev_prefix.sh to make sure this script has been
executed. Any update please let me know. Thanks.
… <#m_-1753781827231586210_>
On Wed, Nov 18, 2020 at 4:15 PM Blueve *@*.*> wrote: @sandycelestica
<https://github.com/sandycelestica> https://github.com/sandycelestica
<https://github.com/sandycelestica> Thanks for your quick response! @.*:$
cat /etc/udev/rules.d/50-ttyUSB-C0.rules
#ACTION=="add",KERNELS=="ttyUSB0",SUBSYSTEMS=="usb-serial",DRIVERS=="cp210x",ATTRS{port_number}=="0",NAME="ttyUSB30",SYMLINK="ttyUSB30"
#ACTION=="add",RUN+="/bin/mkdir test.txt"
#KERNELS=="1-1.1.3",ATTRS{devpath}=="1.1.3",ATTRS{idProduct}=="2303",ATTRS{idVendor}=="067b",SYMLINK+="ttypl2303-%n"
#ACTION=="add",KERNELS=="1-1.1.3",ATTRS{devpath}=="1.1.3",ATTRS{idProduct}=="2303",ATTRS{idVendor}=="067b",SYMLINK+="ttypl2303",RUN+="/bin/mkdir
123.txt" LABEL="parent info"
ACTION=="add",KERNEL=="1-1",SUBSYSTEM=="usb",RUN+="/bin/bash -c
'/usr/local/bin/udev_prefix.sh clear'"
#ACTION=="add",KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash
-c '/usr/local/bin popmsg.sh 0'",RUN+="/bin/bash -c '/usr/local/bin
udev_prefix.sh C0-'",GOTO="C0 Add"
ACTION=="add",KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash
-c '/usr/local/bin/udev_prefix.sh C0-'",GOTO="C0 Add"
ACTION=="remove",KERNELS=="1-1.1",ENV{PRODUCT}=="*424/2517/*",RUN+="/bin/bash
-c '/usr/local/bin/udev_prefix.sh clear'",GOTO="C0 Remove" LABEL="C0 Add"
ACTION=="add",KERNELS=="1-1.1.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-1",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-2",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-3",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-4",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-5",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-6",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-7",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-8",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-9",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-10",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-11",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-12",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-13",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-14",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-15",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-16",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-17",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-18",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-19",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-20",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-21",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-22",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-23",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-24",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-25",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-26",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-27",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-28",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-29",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-30",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-31",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-32",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-33",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-34",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-35",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-36",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-37",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-38",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-39",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-40",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-41",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-42",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-43",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-44",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-45",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-46",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-47",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-48",MODE="0666" LABEL="C0 Remove"
ACTION=="remove",KERNELS=="1-1.1.1:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 1'"
ACTION=="remove",KERNELS=="1-1.1.1:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 2'"
ACTION=="remove",KERNELS=="1-1.1.1:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 3'"
ACTION=="remove",KERNELS=="1-1.1.1:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 4'"
ACTION=="remove",KERNELS=="1-1.1.2:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 5'"
ACTION=="remove",KERNELS=="1-1.1.2:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 6'"
ACTION=="remove",KERNELS=="1-1.1.2:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 7'"
ACTION=="remove",KERNELS=="1-1.1.2:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 8'"
ACTION=="remove",KERNELS=="1-1.1.3:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 9'"
ACTION=="remove",KERNELS=="1-1.1.3:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 10'"
ACTION=="remove",KERNELS=="1-1.1.3:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 11'"
ACTION=="remove",KERNELS=="1-1.1.3:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 12'"
ACTION=="remove",KERNELS=="1-1.1.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 13"
ACTION=="remove",KERNELS=="1-1.1.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 14"
ACTION=="remove",KERNELS=="1-1.1.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 15"
ACTION=="remove",KERNELS=="1-1.1.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 16"
ACTION=="remove",KERNELS=="1-1.1.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 17"
ACTION=="remove",KERNELS=="1-1.1.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 18"
ACTION=="remove",KERNELS=="1-1.1.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 19"
ACTION=="remove",KERNELS=="1-1.1.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 20"
ACTION=="remove",KERNELS=="1-1.1.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 21"
ACTION=="remove",KERNELS=="1-1.1.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 22"
ACTION=="remove",KERNELS=="1-1.1.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 23"
ACTION=="remove",KERNELS=="1-1.1.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 24"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 25"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 26"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 27"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 28"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 29"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 30"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 31"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 32"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 33"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 34"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 35"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 36"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 37"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 38"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 39"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 40"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 41"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 42"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 43"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 44"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 45"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 46"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 47"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 48" *@*.***:$ cat
/usr/local/bin/udev_prefix.sh #!/bin/bash
PREV_REBOOT_CAUSE="/host/reboot-cause/" DEVICE="/usr/share/sonic/device"
PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v
DEVICE_METADATA.localhost.platform) FILES=$DEVICE/$PLATFORM/plugins
FILENAME="udevprefix.conf" if [ "$1" = "clear" ] then if [ -e
$FILES/$FILENAME ]; then rm $FILES/$FILENAME fi else if [ -e
$FILES/$FILENAME ]; then : > $FILES/$FILENAME echo -n "$1" >
$FILES/$FILENAME else touch $FILES/$FILENMAE echo -n "$1" >
$FILES/$FILENAME fi fi I will try add something to this script tomorrow and
get back to you. I was wondering if there a hardware different or something
cause this problem? Here is my udev detail for ttyUSB0, but I think it
should match the rule... *@*.***:~$ udevadm info -a -n /dev/ttyUSB0
Udevadm info starts with the device specified by the devpath and then walks
up the chain of parent devices. It prints for every device found, all
possible attributes in the udev rules key format. A rule to match, can be
composed by the attributes of the device and the attributes from one single
parent device. looking at device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/ttyUSB0/tty/ttyUSB0':
KERNEL=="ttyUSB0" SUBSYSTEM=="tty" DRIVER=="" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/ttyUSB0':
KERNELS=="ttyUSB0" SUBSYSTEMS=="usb-serial" DRIVERS=="cp210x"
ATTRS{port_number}=="0" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0':
KERNELS=="1-1.1.1:1.0" SUBSYSTEMS=="usb" DRIVERS=="cp210x"
ATTRS{interface}=="CP2108 Interface 0" ATTRS{authorized}=="1"
ATTRS{bInterfaceClass}=="ff" ATTRS{bNumEndpoints}=="02"
ATTRS{bAlternateSetting}==" 0" ATTRS{bInterfaceNumber}=="00"
ATTRS{supports_autosuspend}=="1" ATTRS{bInterfaceProtocol}=="00"
ATTRS{bInterfaceSubClass}=="00" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1':
KERNELS=="1-1.1.1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{maxchild}=="0"
ATTRS{manufacturer}=="Silicon Labs" ATTRS{speed}=="12" ATTRS{rx_lanes}=="1"
ATTRS{bDeviceProtocol}=="00" ATTRS{idProduct}=="ea71"
ATTRS{bMaxPacketSize0}=="64" ATTRS{bcdDevice}=="0100"
ATTRS{bDeviceSubClass}=="00" ATTRS{removable}=="unknown"
ATTRS{configuration}=="" ATTRS{bNumConfigurations}=="1"
ATTRS{authorized}=="1" ATTRS{devpath}=="1.1.1" ATTRS{bMaxPower}=="100mA"
ATTRS{bConfigurationValue}=="1" ATTRS{avoid_reset_quirk}=="0"
ATTRS{bDeviceClass}=="00" ATTRS{product}=="CP2108 Quad USB to UART Bridge"
ATTRS{urbnum}=="37" ATTRS{tx_lanes}=="1" ATTRS{quirks}=="0x0"
ATTRS{serial}=="0001" ATTRS{idVendor}=="10c4" ATTRS{ltm_capable}=="no"
ATTRS{bNumInterfaces}==" 4" ATTRS{devnum}=="18" ATTRS{bmAttributes}=="80"
ATTRS{version}==" 2.00" ATTRS{busnum}=="1" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1': KERNELS=="1-1.1"
SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{idProduct}=="2517"
ATTRS{manufacturer}=="Celestica" ATTRS{speed}=="480"
ATTRS{bMaxPacketSize0}=="64" ATTRS{removable}=="unknown"
ATTRS{serial}=="C1010NNN010A22BY200022" ATTRS{bMaxPower}=="2mA"
ATTRS{busnum}=="1" ATTRS{urbnum}=="94" ATTRS{idVendor}=="0424"
ATTRS{maxchild}=="7" ATTRS{bDeviceSubClass}=="00" ATTRS{version}==" 2.00"
ATTRS{tx_lanes}=="1" ATTRS{devnum}=="17" ATTRS{avoid_reset_quirk}=="0"
ATTRS{ltm_capable}=="no" ATTRS{bConfigurationValue}=="1"
ATTRS{rx_lanes}=="1" ATTRS{bmAttributes}=="e0" ATTRS{bDeviceProtocol}=="02"
ATTRS{quirks}=="0x0" ATTRS{bDeviceClass}=="09" ATTRS{bcdDevice}=="0000"
ATTRS{devpath}=="1.1" ATTRS{authorized}=="1" ATTRS{product}=="C1010"
ATTRS{configuration}=="" ATTRS{bNumInterfaces}==" 1"
ATTRS{bNumConfigurations}=="1" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1': KERNELS=="1-1"
SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{bNumInterfaces}==" 1"
ATTRS{busnum}=="1" ATTRS{configuration}=="" ATTRS{authorized}=="1"
ATTRS{bMaxPacketSize0}=="64" ATTRS{version}==" 2.00" ATTRS{maxchild}=="4"
ATTRS{removable}=="unknown" ATTRS{idVendor}=="8087"
ATTRS{idProduct}=="07db" ATTRS{bmAttributes}=="e0" ATTRS{quirks}=="0x0"
ATTRS{bcdDevice}=="0003" ATTRS{ltm_capable}=="no" ATTRS{bMaxPower}=="0mA"
ATTRS{rx_lanes}=="1" ATTRS{bDeviceProtocol}=="01" ATTRS{speed}=="480"
ATTRS{bConfigurationValue}=="1" ATTRS{devnum}=="2" ATTRS{urbnum}=="54"
ATTRS{bDeviceClass}=="09" ATTRS{devpath}=="1"
ATTRS{bNumConfigurations}=="1" ATTRS{bDeviceSubClass}=="00"
ATTRS{tx_lanes}=="1" ATTRS{avoid_reset_quirk}=="0" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1': KERNELS=="usb1" SUBSYSTEMS=="usb"
DRIVERS=="usb" ATTRS{maxchild}=="8" ATTRS{urbnum}=="36"
ATTRS{serial}=="0000:00:16.0" ATTRS{devnum}=="1" ATTRS{bNumInterfaces}=="
1" ATTRS{interface_authorized_default}=="1" ATTRS{busnum}=="1"
ATTRS{authorized}=="1" ATTRS{configuration}=="" ATTRS{idVendor}=="1d6b"
ATTRS{tx_lanes}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{bmAttributes}=="e0"
ATTRS{manufacturer}=="Linux 4.19.0-9-2-amd64 ehci_hcd" ATTRS{rx_lanes}=="1"
ATTRS{bDeviceClass}=="09" ATTRS{bConfigurationValue}=="1"
ATTRS{speed}=="480" ATTRS{devpath}=="0" ATTRS{bDeviceProtocol}=="00"
ATTRS{removable}=="unknown" ATTRS{bNumConfigurations}=="1"
ATTRS{quirks}=="0x0" ATTRS{bcdDevice}=="0419"
ATTRS{authorized_default}=="1" ATTRS{bDeviceSubClass}=="00"
ATTRS{idProduct}=="0002" ATTRS{version}==" 2.00" ATTRS{product}=="EHCI Host
Controller" ATTRS{bMaxPower}=="0mA" ATTRS{avoid_reset_quirk}=="0"
ATTRS{ltm_capable}=="no" looking at parent device
'/devices/pci0000:00/0000:00:16.0': KERNELS=="0000:00:16.0"
SUBSYSTEMS=="pci" DRIVERS=="ehci-pci" ATTRS{driver_override}=="(null)"
ATTRS{dma_mask_bits}=="32" ATTRS{local_cpus}=="3" ATTRS{device}=="0x1f2c"
ATTRS{subsystem_device}=="0x7270" ATTRS{class}=="0x0c0320"
ATTRS{uframe_periodic_max}=="100" ATTRS{ari_enabled}=="0"
ATTRS{revision}=="0x03" ATTRS{numa_node}=="-1" ATTRS{d3cold_allowed}=="1"
ATTRS{enable}=="1" ATTRS{broken_parity_status}=="0" ATTRS{vendor}=="0x8086"
ATTRS{consistent_dma_mask_bits}=="32" ATTRS{irq}=="23"
ATTRS{subsystem_vendor}=="0x8086" ATTRS{local_cpulist}=="0-1"
ATTRS{companion}=="" ATTRS{msi_bus}=="1" looking at parent device
'/devices/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS=="" —
You are receiving this because you were mentioned. Reply to this email
directly, view it on GitHub <#5943 (comment)
<#5943 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALLLGDT5JA2AUZDZZDGVOLLSQN7BDANCNFSM4TYEDRNQ
.
-- Thanks and Regards. Sandy Li Software Design Engineering Specialist,GDS
SSL Mobile: +86 <+86%20136%201189%204667>18073112486 Email: ***@***.***
***@***.***> ***@***.*** ***@***.***>*
www.celestica.com Think Bigger, Reach Further
I tried let the script output something to a file but no luck. Seems like
these two rules are not triggered...
@sandycelestica <https://github.com/sandycelestica> Which image are you
using now? How about try master 492 on your side?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDW3NUCBT7ETQHOAREDSQSZOBANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
@sandycelestica |
Thanks. Got it.
I will update you after I download the image and test it. It would need
some time as download speed is limited.
…On Thu, Nov 19, 2020 at 3:07 PM Blueve ***@***.***> wrote:
We have tried the 201911 and 201811 branch. For master 492 could you share
with me the image.As we build it may need more time.
… <#m_1974591303391248540_>
On Thu, Nov 19, 2020 at 2:12 PM Blueve *@*.*> wrote: Yes,It matches the
rules.See below:
ACTION=="add",KERNEL=="ttyUSB",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash
-c '/usr/local/bin/udev_prefix.sh C0-'",GOTO="C0 Add" Then please help to
add some debug info in udev_prefix.sh to make sure this script has been
executed. Any update please let me know. Thanks. …
<#m_-1753781827231586210_> On Wed, Nov 18, 2020 at 4:15 PM Blueve @.>
wrote: @sandycelestica <https://github.com/sandycelestica>
https://github.com/sandycelestica <https://github.com/sandycelestica>
https://github.com/sandycelestica <https://github.com/sandycelestica>
https://github.com/sandycelestica <https://github.com/sandycelestica>
Thanks for your quick response! @.*:$ cat
/etc/udev/rules.d/50-ttyUSB-C0.rules
#ACTION=="add",KERNELS=="ttyUSB0",SUBSYSTEMS=="usb-serial",DRIVERS=="cp210x",ATTRS{port_number}=="0",NAME="ttyUSB30",SYMLINK="ttyUSB30"
#ACTION=="add",RUN+="/bin/mkdir test.txt"
#KERNELS=="1-1.1.3",ATTRS{devpath}=="1.1.3",ATTRS{idProduct}=="2303",ATTRS{idVendor}=="067b",SYMLINK+="ttypl2303-%n"
#ACTION=="add",KERNELS=="1-1.1.3",ATTRS{devpath}=="1.1.3",ATTRS{idProduct}=="2303",ATTRS{idVendor}=="067b",SYMLINK+="ttypl2303",RUN+="/bin/mkdir
123.txt" LABEL="parent info"
ACTION=="add",KERNEL=="1-1",SUBSYSTEM=="usb",RUN+="/bin/bash -c
'/usr/local/bin/udev_prefix.sh clear'"
#ACTION=="add",KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash
-c '/usr/local/bin popmsg.sh 0'",RUN+="/bin/bash -c '/usr/local/bin
udev_prefix.sh C0-'",GOTO="C0 Add"
ACTION=="add",KERNEL=="ttyUSB*",SUBSYSTEM=="tty",KERNELS=="1-1.1",ATTRS{idProduct}=="2517",ATTRS{idVendor}=="0424",RUN+="/bin/bash
-c '/usr/local/bin/udev_prefix.sh C0-'",GOTO="C0 Add"
ACTION=="remove",KERNELS=="1-1.1",ENV{PRODUCT}=="*424/2517/*",RUN+="/bin/bash
-c '/usr/local/bin/udev_prefix.sh clear'",GOTO="C0 Remove" LABEL="C0 Add"
ACTION=="add",KERNELS=="1-1.1.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-1",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-2",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-3",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-4",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-5",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-6",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-7",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-8",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-9",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-10",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-11",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-12",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-13",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-14",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-15",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-16",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-17",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-18",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-19",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-20",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-21",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-22",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-23",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-24",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-25",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-26",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-27",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-28",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-29",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-30",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-31",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-32",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-33",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-34",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-35",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-36",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-37",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-38",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-39",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-40",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-41",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-42",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-43",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-44",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",SYMLINK+="C0-45",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",SYMLINK+="C0-46",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",SYMLINK+="C0-47",MODE="0666"
ACTION=="add",KERNELS=="1-1.1.7.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",SYMLINK+="C0-48",MODE="0666" LABEL="C0 Remove"
ACTION=="remove",KERNELS=="1-1.1.1:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 1'"
ACTION=="remove",KERNELS=="1-1.1.1:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 2'"
ACTION=="remove",KERNELS=="1-1.1.1:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 3'"
ACTION=="remove",KERNELS=="1-1.1.1:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 4'"
ACTION=="remove",KERNELS=="1-1.1.2:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 5'"
ACTION=="remove",KERNELS=="1-1.1.2:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 6'"
ACTION=="remove",KERNELS=="1-1.1.2:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 7'"
ACTION=="remove",KERNELS=="1-1.1.2:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 8'"
ACTION=="remove",KERNELS=="1-1.1.3:1.0",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 9'"
ACTION=="remove",KERNELS=="1-1.1.3:1.1",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 10'"
ACTION=="remove",KERNELS=="1-1.1.3:1.2",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 11'"
ACTION=="remove",KERNELS=="1-1.1.3:1.3",ENV{PRODUCT}=="10c4/ea71/*",RUN+="/bin/bash
-c '/usr/local/bin/popmsg.sh 12'"
ACTION=="remove",KERNELS=="1-1.1.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 13"
ACTION=="remove",KERNELS=="1-1.1.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 14"
ACTION=="remove",KERNELS=="1-1.1.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 15"
ACTION=="remove",KERNELS=="1-1.1.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 16"
ACTION=="remove",KERNELS=="1-1.1.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 17"
ACTION=="remove",KERNELS=="1-1.1.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 18"
ACTION=="remove",KERNELS=="1-1.1.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 19"
ACTION=="remove",KERNELS=="1-1.1.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 20"
ACTION=="remove",KERNELS=="1-1.1.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 21"
ACTION=="remove",KERNELS=="1-1.1.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 22"
ACTION=="remove",KERNELS=="1-1.1.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 23"
ACTION=="remove",KERNELS=="1-1.1.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 24"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 25"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 26"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 27"
ACTION=="remove",KERNELS=="1-1.1.7.1:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 28"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 29"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 30"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 31"
ACTION=="remove",KERNELS=="1-1.1.7.2:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 32"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 33"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 34"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 35"
ACTION=="remove",KERNELS=="1-1.1.7.3:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 36"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 37"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 38"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 39"
ACTION=="remove",KERNELS=="1-1.1.7.4:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 40"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 41"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 42"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 43"
ACTION=="remove",KERNELS=="1-1.1.7.5:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 44"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.0",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="00",ATTRS{interface}=="CP2108
Interface 0",RUN+="/usr/local/bin/popmsg.sh 45"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.1",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="01",ATTRS{interface}=="CP2108
Interface 1",RUN+="/usr/local/bin/popmsg.sh 46"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.2",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="02",ATTRS{interface}=="CP2108
Interface 2",RUN+="/usr/local/bin/popmsg.sh 47"
ACTION=="remove",KERNELS=="1-1.1.7.6:1.3",DRIVERS=="cp210x",ATTRS{bInterfaceNumber}=="03",ATTRS{interface}=="CP2108
Interface 3",RUN+="/usr/local/bin/popmsg.sh 48" *@*.*:$ cat
/usr/local/bin/udev_prefix.sh #!/bin/bash
PREV_REBOOT_CAUSE="/host/reboot-cause/" DEVICE="/usr/share/sonic/device"
PLATFORM=$(/usr/local/bin/sonic-cfggen -H -v
DEVICE_METADATA.localhost.platform) FILES=$DEVICE/$PLATFORM/plugins
FILENAME="udevprefix.conf" if [ "$1" = "clear" ] then if [ -e
$FILES/$FILENAME ]; then rm $FILES/$FILENAME fi else if [ -e
$FILES/$FILENAME ]; then : > $FILES/$FILENAME echo -n "$1" >
$FILES/$FILENAME else touch $FILES/$FILENMAE echo -n "$1" >
$FILES/$FILENAME fi fi I will try add something to this script tomorrow and
get back to you. I was wondering if there a hardware different or something
cause this problem? Here is my udev detail for ttyUSB0, but I think it
should match the rule... @.*:~$ udevadm info -a -n /dev/ttyUSB0 Udevadm
info starts with the device specified by the devpath and then walks up the
chain of parent devices. It prints for every device found, all possible
attributes in the udev rules key format. A rule to match, can be composed
by the attributes of the device and the attributes from one single parent
device. looking at device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/ttyUSB0/tty/ttyUSB0':
KERNEL=="ttyUSB0" SUBSYSTEM=="tty" DRIVER=="" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/ttyUSB0':
KERNELS=="ttyUSB0" SUBSYSTEMS=="usb-serial" DRIVERS=="cp210x"
ATTRS{port_number}=="0" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0':
KERNELS=="1-1.1.1:1.0" SUBSYSTEMS=="usb" DRIVERS=="cp210x"
ATTRS{interface}=="CP2108 Interface 0" ATTRS{authorized}=="1"
ATTRS{bInterfaceClass}=="ff" ATTRS{bNumEndpoints}=="02"
ATTRS{bAlternateSetting}==" 0" ATTRS{bInterfaceNumber}=="00"
ATTRS{supports_autosuspend}=="1" ATTRS{bInterfaceProtocol}=="00"
ATTRS{bInterfaceSubClass}=="00" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1/1-1.1.1':
KERNELS=="1-1.1.1" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{maxchild}=="0"
ATTRS{manufacturer}=="Silicon Labs" ATTRS{speed}=="12" ATTRS{rx_lanes}=="1"
ATTRS{bDeviceProtocol}=="00" ATTRS{idProduct}=="ea71"
ATTRS{bMaxPacketSize0}=="64" ATTRS{bcdDevice}=="0100"
ATTRS{bDeviceSubClass}=="00" ATTRS{removable}=="unknown"
ATTRS{configuration}=="" ATTRS{bNumConfigurations}=="1"
ATTRS{authorized}=="1" ATTRS{devpath}=="1.1.1" ATTRS{bMaxPower}=="100mA"
ATTRS{bConfigurationValue}=="1" ATTRS{avoid_reset_quirk}=="0"
ATTRS{bDeviceClass}=="00" ATTRS{product}=="CP2108 Quad USB to UART Bridge"
ATTRS{urbnum}=="37" ATTRS{tx_lanes}=="1" ATTRS{quirks}=="0x0"
ATTRS{serial}=="0001" ATTRS{idVendor}=="10c4" ATTRS{ltm_capable}=="no"
ATTRS{bNumInterfaces}==" 4" ATTRS{devnum}=="18" ATTRS{bmAttributes}=="80"
ATTRS{version}==" 2.00" ATTRS{busnum}=="1" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1/1-1.1': KERNELS=="1-1.1"
SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{idProduct}=="2517"
ATTRS{manufacturer}=="Celestica" ATTRS{speed}=="480"
ATTRS{bMaxPacketSize0}=="64" ATTRS{removable}=="unknown"
ATTRS{serial}=="C1010NNN010A22BY200022" ATTRS{bMaxPower}=="2mA"
ATTRS{busnum}=="1" ATTRS{urbnum}=="94" ATTRS{idVendor}=="0424"
ATTRS{maxchild}=="7" ATTRS{bDeviceSubClass}=="00" ATTRS{version}==" 2.00"
ATTRS{tx_lanes}=="1" ATTRS{devnum}=="17" ATTRS{avoid_reset_quirk}=="0"
ATTRS{ltm_capable}=="no" ATTRS{bConfigurationValue}=="1"
ATTRS{rx_lanes}=="1" ATTRS{bmAttributes}=="e0" ATTRS{bDeviceProtocol}=="02"
ATTRS{quirks}=="0x0" ATTRS{bDeviceClass}=="09" ATTRS{bcdDevice}=="0000"
ATTRS{devpath}=="1.1" ATTRS{authorized}=="1" ATTRS{product}=="C1010"
ATTRS{configuration}=="" ATTRS{bNumInterfaces}==" 1"
ATTRS{bNumConfigurations}=="1" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1/1-1': KERNELS=="1-1"
SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{bNumInterfaces}==" 1"
ATTRS{busnum}=="1" ATTRS{configuration}=="" ATTRS{authorized}=="1"
ATTRS{bMaxPacketSize0}=="64" ATTRS{version}==" 2.00" ATTRS{maxchild}=="4"
ATTRS{removable}=="unknown" ATTRS{idVendor}=="8087"
ATTRS{idProduct}=="07db" ATTRS{bmAttributes}=="e0" ATTRS{quirks}=="0x0"
ATTRS{bcdDevice}=="0003" ATTRS{ltm_capable}=="no" ATTRS{bMaxPower}=="0mA"
ATTRS{rx_lanes}=="1" ATTRS{bDeviceProtocol}=="01" ATTRS{speed}=="480"
ATTRS{bConfigurationValue}=="1" ATTRS{devnum}=="2" ATTRS{urbnum}=="54"
ATTRS{bDeviceClass}=="09" ATTRS{devpath}=="1"
ATTRS{bNumConfigurations}=="1" ATTRS{bDeviceSubClass}=="00"
ATTRS{tx_lanes}=="1" ATTRS{avoid_reset_quirk}=="0" looking at parent device
'/devices/pci0000:00/0000:00:16.0/usb1': KERNELS=="usb1" SUBSYSTEMS=="usb"
DRIVERS=="usb" ATTRS{maxchild}=="8" ATTRS{urbnum}=="36"
ATTRS{serial}=="0000:00:16.0" ATTRS{devnum}=="1" ATTRS{bNumInterfaces}=="
1" ATTRS{interface_authorized_default}=="1" ATTRS{busnum}=="1"
ATTRS{authorized}=="1" ATTRS{configuration}=="" ATTRS{idVendor}=="1d6b"
ATTRS{tx_lanes}=="1" ATTRS{bMaxPacketSize0}=="64" ATTRS{bmAttributes}=="e0"
ATTRS{manufacturer}=="Linux 4.19.0-9-2-amd64 ehci_hcd" ATTRS{rx_lanes}=="1"
ATTRS{bDeviceClass}=="09" ATTRS{bConfigurationValue}=="1"
ATTRS{speed}=="480" ATTRS{devpath}=="0" ATTRS{bDeviceProtocol}=="00"
ATTRS{removable}=="unknown" ATTRS{bNumConfigurations}=="1"
ATTRS{quirks}=="0x0" ATTRS{bcdDevice}=="0419"
ATTRS{authorized_default}=="1" ATTRS{bDeviceSubClass}=="00"
ATTRS{idProduct}=="0002" ATTRS{version}==" 2.00" ATTRS{product}=="EHCI Host
Controller" ATTRS{bMaxPower}=="0mA" ATTRS{avoid_reset_quirk}=="0"
ATTRS{ltm_capable}=="no" looking at parent device
'/devices/pci0000:00/0000:00:16.0': KERNELS=="0000:00:16.0"
SUBSYSTEMS=="pci" DRIVERS=="ehci-pci" ATTRS{driver_override}=="(null)"
ATTRS{dma_mask_bits}=="32" ATTRS{local_cpus}=="3" ATTRS{device}=="0x1f2c"
ATTRS{subsystem_device}=="0x7270" ATTRS{class}=="0x0c0320"
ATTRS{uframe_periodic_max}=="100" ATTRS{ari_enabled}=="0"
ATTRS{revision}=="0x03" ATTRS{numa_node}=="-1" ATTRS{d3cold_allowed}=="1"
ATTRS{enable}=="1" ATTRS{broken_parity_status}=="0" ATTRS{vendor}=="0x8086"
ATTRS{consistent_dma_mask_bits}=="32" ATTRS{irq}=="23"
ATTRS{subsystem_vendor}=="0x8086" ATTRS{local_cpulist}=="0-1"
ATTRS{companion}=="" ATTRS{msi_bus}=="1" looking at parent device
'/devices/pci0000:00': KERNELS=="pci0000:00" SUBSYSTEMS=="" DRIVERS=="" —
You are receiving this because you were mentioned. Reply to this email
directly, view it on GitHub <#5943
<#5943> (comment) <#5943
(comment)
<#5943 (comment)>>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALLLGDT5JA2AUZDZZDGVOLLSQN7BDANCNFSM4TYEDRNQ
. -- Thanks and Regards. Sandy Li Software Design Engineering
Specialist,GDS SSL Mobile: +86 <+86%20136%201189%204667>18073112486 Email:
*@*.*** *@*.*> @.* *@*.***>* www.celestica.com Think Bigger, Reach
Further I tried let the script output something to a file but no luck.
Seems like these two rules are not triggered... @sandycelestica
<https://github.com/sandycelestica> https://github.com/sandycelestica
Which image are you using now? How about try master 492 on your side? — You
are receiving this because you were mentioned. Reply to this email
directly, view it on GitHub <#5943 (comment)
<#5943 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALLLGDW3NUCBT7ETQHOAREDSQSZOBANCNFSM4TYEDRNQ
.
-- Thanks and Regards. Sandy Li Software Design Engineering Specialist,GDS
SSL Mobile: +86 <+86%20136%201189%204667>18073112486 Email: ***@***.***
***@***.***> ***@***.*** ***@***.***>*
www.celestica.com Think Bigger, Reach Further
Yeah sure, here is the 492 image link:
https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/492/artifact/target/sonic-broadcom.bin
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDSNQQS6MDX4SA2A6YLSQS72BANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
Interest founding:
The script's attribute is shown below:
After I executed below command manually, the udev rule script works fine.
@sandycelestica could you share your script's attributes? May be we need to add execution permission to this script after copy it. |
Here are the attributes of the scripts.
admin@sonic:/usr/local/bin$ ls -la popmsg.sh
-rwxr-xr-x 1 root staff 364 Jul 29 15:04 popmsg.sh
admin@sonic:/usr/local/bin$ ls -la udev_prefix.sh
-rwxr-xr-x 1 root staff 494 Aug 25 16:29 udev_prefix.sh
admin@sonic:/usr/local/bin$
Agree with you. We need to add the execution permission.
…On Thu, Nov 19, 2020 at 3:34 PM Blueve ***@***.***> wrote:
Interest founding:
The rule actually matched but the bash run failed due to permission issue.
I thought the udev will using root to execute scirpt?
Mar 22 10:12:31 sonic systemd-udevd[32296]: '/bin/bash -c '/usr/local/bin/udev_prefix.sh clear''(err) '/bin/bash: /usr/local/bin/udev_prefix.sh: Permission denied'
Mar 22 10:12:31 sonic systemd-udevd[32296]: Process '/bin/bash -c '/usr/local/bin/udev_prefix.sh clear'' failed with exit code 126.
Mar 22 10:13:49 sonic systemd-udevd[32416]: '/bin/bash -c '/usr/local/bin/udev_prefix.sh C0-''(err) '/bin/bash: /usr/local/bin/udev_prefix.sh: Permission denied'
Mar 22 10:13:49 sonic systemd-udevd[32416]: Process '/bin/bash -c '/usr/local/bin/udev_prefix.sh C0-'' failed with exit code 126.
The script's attribute is shown below:
***@***.***:~$ ls -a -l /usr/local/bin/udev_prefix.sh
-rw-r--r-- 1 root root 531 Mar 22 08:21 /usr/local/bin/udev_prefix.sh
After I executed below command manually, the udev rule script works find.
***@***.***:~$ sudo chmod +x /usr/local/bin/udev_prefix.sh
@sandycelestica <https://github.com/sandycelestica> could you share your
script's attributes? May be we need to add execution permission to this
script after copy it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDTKH2SRMMEJYYBXNQLSQTDALANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
Yes, before I always run as root.
…On Thu, Nov 19, 2020 at 3:42 PM Sandy Li ***@***.***> wrote:
Here are the attributes of the scripts.
***@***.***:/usr/local/bin$ ls -la popmsg.sh
-rwxr-xr-x 1 root staff 364 Jul 29 15:04 popmsg.sh
***@***.***:/usr/local/bin$ ls -la udev_prefix.sh
-rwxr-xr-x 1 root staff 494 Aug 25 16:29 udev_prefix.sh
***@***.***:/usr/local/bin$
Agree with you. We need to add the execution permission.
On Thu, Nov 19, 2020 at 3:34 PM Blueve ***@***.***> wrote:
> Interest founding:
> The rule actually matched but the bash run failed due to permission
> issue. I thought the udev will using root to execute scirpt?
>
> Mar 22 10:12:31 sonic systemd-udevd[32296]: '/bin/bash -c '/usr/local/bin/udev_prefix.sh clear''(err) '/bin/bash: /usr/local/bin/udev_prefix.sh: Permission denied'
> Mar 22 10:12:31 sonic systemd-udevd[32296]: Process '/bin/bash -c '/usr/local/bin/udev_prefix.sh clear'' failed with exit code 126.
>
> Mar 22 10:13:49 sonic systemd-udevd[32416]: '/bin/bash -c '/usr/local/bin/udev_prefix.sh C0-''(err) '/bin/bash: /usr/local/bin/udev_prefix.sh: Permission denied'
> Mar 22 10:13:49 sonic systemd-udevd[32416]: Process '/bin/bash -c '/usr/local/bin/udev_prefix.sh C0-'' failed with exit code 126.
>
> The script's attribute is shown below:
>
> ***@***.***:~$ ls -a -l /usr/local/bin/udev_prefix.sh
> -rw-r--r-- 1 root root 531 Mar 22 08:21 /usr/local/bin/udev_prefix.sh
>
> After I executed below command manually, the udev rule script works find.
>
> ***@***.***:~$ sudo chmod +x /usr/local/bin/udev_prefix.sh
>
> @sandycelestica <https://github.com/sandycelestica> could you share your
> script's attributes? May be we need to add execution permission to this
> script after copy it.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#5943 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALLLGDTKH2SRMMEJYYBXNQLSQTDALANCNFSM4TYEDRNQ>
> .
>
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: ***@***.*** ***@***.***>*
www.celestica.com
Think Bigger, Reach Further
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
@sandycelestica Do you know where is the best place to add the chmod script? I try searched in this code repo, but seems like there are no sample... Maybe platform-modules-haliburton.postinst? |
Yes, I am also thinking about this problem.
First we can add in udevrules. RUN+="....." .I don't think it is the best
place. But right now I have no other better idea.
…On Thu, Nov 19, 2020 at 4:02 PM Blueve ***@***.***> wrote:
@sandycelestica <https://github.com/sandycelestica> Do you know where is
the best place to add the chmod script? I try searched this code repo, but
seems like there are no sample...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDUKXFJBQHPLTLRQFD3SQTGH3ANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
Could you try add chmod scrpit in this file? |
Sure I'll verify it first.
…On Thu, Nov 19, 2020 at 4:48 PM Blueve ***@***.***> wrote:
Could you try add chmod scrpit in this file?
https://github.com/Azure/sonic-buildimage/blob/4c8b1c4896c374ef1132cbfc31524516c97db82c/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.postinst
This script will run after install finished.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDWLWKSLVQCUOPAGEG3SQTLWFANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
Hi Blueve,
I verified and updated the script.
[image: image.png]
And below is the test log:
admin@sonic:~$ ls
mytty.json
platform-modules-haliburton_0.9_amd64.deb
platform-modules-haliburton_1.0_amd64.deb
admin@sonic:~$ cd /usr/local/bin/
admin@sonic:/usr/local/bin$ ls -l *.sh
-rwxr-xr-x 1 root staff 2054 Jul 31 2020 finalize-warmboot.sh
-rwxr-xr-x 1 root staff 162 Jul 31 2020 host-ssh-keygen.sh
-rwxr-xr-x 1 root root 963 Jan 28 03:45 platform_api_mgnt.sh
-rw-r--r-- 1 root root 227 Aug 17 2018 popmsg.sh
-rwxr-xr-x 1 root staff 6240 Jul 31 2020 swss.sh
-rwxr-xr-x 1 root staff 5981 Jul 31 2020 syncd.sh
-rw-r--r-- 1 root root 485 Aug 17 2018 udev_prefix.sh
admin@sonic:/usr/local/bin$ cd ~
admin@sonic:~$
admin@sonic:~$ sudo dpkg -i platform-modules-haliburton_1.0_amd64.deb
(Reading database ... 27246 files and directories currently installed.)
Preparing to unpack platform-modules-haliburton_1.0_amd64.deb ...
Unpacking platform-modules-haliburton (1.0) over (0.9) ...
Setting up platform-modules-haliburton (1.0) ...
Synchronizing state of platform-modules-haliburton.service with SysV
service script with /lib/systemd/systemd-sysv-install.
........
admin@sonic:~$
admin@sonic:~$ cd /usr/local/bin/
admin@sonic:/usr/local/bin$ ls -l *.sh
-rwxr-xr-x 1 root staff 2054 Jul 31 2020 finalize-warmboot.sh
-rwxr-xr-x 1 root staff 162 Jul 31 2020 host-ssh-keygen.sh
-rwxr-xr-x 1 root root 963 Jan 28 03:45 platform_api_mgnt.sh
-rwxr-xr-x 1 root root 227 Jan 28 03:45 popmsg.sh
-rwxr-xr-x 1 root staff 6240 Jul 31 2020 swss.sh
-rwxr-xr-x 1 root staff 5981 Jul 31 2020 syncd.sh
-rwxr-xr-x 1 root root 485 Jan 28 03:45 udev_prefix.sh
…On Thu, Nov 19, 2020 at 4:50 PM Sandy Li ***@***.***> wrote:
Sure I'll verify it first.
On Thu, Nov 19, 2020 at 4:48 PM Blueve ***@***.***> wrote:
> Could you try add chmod scrpit in this file?
>
> https://github.com/Azure/sonic-buildimage/blob/4c8b1c4896c374ef1132cbfc31524516c97db82c/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.postinst
> This script will run after install finished.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#5943 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALLLGDWLWKSLVQCUOPAGEG3SQTLWFANCNFSM4TYEDRNQ>
> .
>
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: ***@***.*** ***@***.***>*
www.celestica.com
Think Bigger, Reach Further
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
@sandycelestica Awesome! Could you please sent out the PR? I can link it to this issue and review it : D |
I submitted the PR and here is the PR link:
#6032
…On Tue, Nov 24, 2020 at 2:49 PM Blueve ***@***.***> wrote:
@sandycelestica <https://github.com/sandycelestica> Awesome! Could you
please sent out the PR? I can link it to this issue and review it : D
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5943 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLLGDT3RLVW5FCEXMN6WIDSRNJIBANCNFSM4TYEDRNQ>
.
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
Updated
#6039
…On Wed, Nov 25, 2020 at 3:02 PM Sandy Li ***@***.***> wrote:
I submitted the PR and here is the PR link:
#6032
On Tue, Nov 24, 2020 at 2:49 PM Blueve ***@***.***> wrote:
> @sandycelestica <https://github.com/sandycelestica> Awesome! Could you
> please sent out the PR? I can link it to this issue and review it : D
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#5943 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALLLGDT3RLVW5FCEXMN6WIDSRNJIBANCNFSM4TYEDRNQ>
> .
>
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: ***@***.*** ***@***.***>*
www.celestica.com
Think Bigger, Reach Further
--
Thanks and Regards.
Sandy Li
Software Design Engineering Specialist,GDS SSL
Mobile: +86 <+86%20136%201189%204667>18073112486
Email: *sandyli@celestica.com <gshao@celestica.com>*
www.celestica.com
Think Bigger, Reach Further
|
Description
Console switch uses udev rule to mapping usb tty devices to fixed tty device. More detial can be found in this HLD: https://github.com/Azure/SONiC/blob/master/doc/udev-terminalserver/udev%20rules%20for%20Terminal%20Server.md
According to our design in this PR: #5571
A
udevprefix.conf
file will be put on platform's plugin folder after the usb console switch plugged on, but it not.I run the script by myself and it works:
Seems like the udev rule not trigger the script correctly?
All above testing are based on master branch's build 492.
Steps to reproduce the issue:
/usr/share/sonic/device/x86_64-cel_e1031-r0/plugins/
Describe the results you received:
No
udevprefix.conf
foundDescribe the results you expected:
There is a
udevprefix.conf
file and the content in it isC0-
Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: