Bonjour à tous,
je travaille pour une expérience avec un gros système électronique. Dans ce système, on utilise à outrance des dongles usb vers :
- du can;
- du spi;
- du rs232;
- de l'i2c.
Pour reconnaitre ces dongles dans le logiciel que j'écris, j'ai fait des règles udev me permettant d'avoir des liens symboliques plus explicites que simplement tty(USB|ACM)xx.
Ces règles udev ont été testées avec succès sur différentes machines et différents OS (fedora, debian, ubuntu…). J'étais donc assez confiant.
Cependant, nos machines de prod vont utiliser alma linux 9 car le cern à recemment choisit cette distribution.
Mon problème c'est que mes regles udev ne semblent plus fonctionner sur les machines utilisant alma linux 9…
Mon fichier 99-x2.rules
# usb->i2c
SUBSYSTEM=="tty" , ATTRS{idVendor}=="04d8" , ATTRS{serial}=="00051241" , SYMLINK+="ttyshaper0"
SUBSYSTEM=="tty" , ATTRS{idVendor}=="04d8" , ATTRS{serial}=="00001229" , SYMLINK+="ttyshaper1"
SUBSYSTEM=="tty" , ATTRS{idvendor}=="04d8" , ATTRS{serial}=="00051229" , SYMLINK+="ttyshaper2"
ci-dessous les info sur le device
udevadm info -a -p $(udevadm info -q path -n /dev/ttyACM0)
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:14.0/usb1/1-12/1-12:1.0/tty/ttyACM0':
KERNEL=="ttyACM0"
SUBSYSTEM=="tty"
DRIVER==""
ATTR{power/control}=="auto"
ATTR{power/runtime_active_time}=="0"
ATTR{power/runtime_status}=="unsupported"
ATTR{power/runtime_suspended_time}=="0"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0':
KERNELS=="1-12:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="cdc_acm"
ATTRS{authorized}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceClass}=="02"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bInterfaceProtocol}=="01"
ATTRS{bInterfaceSubClass}=="02"
ATTRS{bNumEndpoints}=="01"
ATTRS{bmCapabilities}=="2"
ATTRS{supports_autosuspend}=="1"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-12':
KERNELS=="1-12"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{authorized}=="1"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bConfigurationValue}=="1"
ATTRS{bDeviceClass}=="02"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{bMaxPower}=="100mA"
ATTRS{bNumConfigurations}=="1"
ATTRS{bNumInterfaces}==" 2"
ATTRS{bcdDevice}=="0100"
ATTRS{bmAttributes}=="c0"
ATTRS{busnum}=="1"
ATTRS{configuration}==""
ATTRS{devnum}=="11"
ATTRS{devpath}=="12"
ATTRS{idProduct}=="ffee"
ATTRS{idVendor}=="04d8"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Devantech Ltd."
ATTRS{maxchild}=="0"
ATTRS{power/active_duration}=="1015273"
ATTRS{power/autosuspend}=="2"
ATTRS{power/autosuspend_delay_ms}=="2000"
ATTRS{power/connected_duration}=="1015273"
ATTRS{power/control}=="on"
ATTRS{power/level}=="on"
ATTRS{power/persist}=="1"
ATTRS{power/runtime_active_time}=="1015031"
ATTRS{power/runtime_status}=="active"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{product}=="USB-ISS."
ATTRS{quirks}=="0x0"
ATTRS{removable}=="removable"
ATTRS{remove}=="(write-only)"
ATTRS{rx_lanes}=="1"
ATTRS{serial}=="00051229"
ATTRS{speed}=="12"
ATTRS{tx_lanes}=="1"
ATTRS{urbnum}=="13"
ATTRS{version}==" 2.00"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{authorized}=="1"
ATTRS{authorized_default}=="1"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bConfigurationValue}=="1"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceProtocol}=="01"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bMaxPower}=="0mA"
ATTRS{bNumConfigurations}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bcdDevice}=="0514"
ATTRS{bmAttributes}=="e0"
ATTRS{busnum}=="1"
ATTRS{configuration}==""
ATTRS{devnum}=="1"
ATTRS{devpath}=="0"
ATTRS{idProduct}=="0002"
ATTRS{idVendor}=="1d6b"
ATTRS{interface_authorized_default}=="1"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 5.14.0-162.6.1.el9_1.x86_64 xhci-hcd"
ATTRS{maxchild}=="16"
ATTRS{power/active_duration}=="4050276"
ATTRS{power/autosuspend}=="0"
ATTRS{power/autosuspend_delay_ms}=="0"
ATTRS{power/connected_duration}=="4050276"
ATTRS{power/control}=="auto"
ATTRS{power/level}=="auto"
ATTRS{power/runtime_active_time}=="4050274"
ATTRS{power/runtime_status}=="active"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{power/wakeup}=="disabled"
ATTRS{power/wakeup_abort_count}==""
ATTRS{power/wakeup_active}==""
ATTRS{power/wakeup_active_count}==""
ATTRS{power/wakeup_count}==""
ATTRS{power/wakeup_expire_count}==""
ATTRS{power/wakeup_last_time_ms}==""
ATTRS{power/wakeup_max_time_ms}==""
ATTRS{power/wakeup_total_time_ms}==""
ATTRS{product}=="xHCI Host Controller"
ATTRS{quirks}=="0x0"
ATTRS{removable}=="unknown"
ATTRS{remove}=="(write-only)"
ATTRS{rx_lanes}=="1"
ATTRS{serial}=="0000:00:14.0"
ATTRS{speed}=="480"
ATTRS{tx_lanes}=="1"
ATTRS{urbnum}=="222"
ATTRS{version}==" 2.00"
looking at parent device '/devices/pci0000:00/0000:00:14.0':
KERNELS=="0000:00:14.0"
SUBSYSTEMS=="pci"
DRIVERS=="xhci_hcd"
ATTRS{ari_enabled}=="0"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0330"
ATTRS{consistent_dma_mask_bits}=="64"
ATTRS{d3cold_allowed}=="1"
ATTRS{dbc}=="disabled"
ATTRS{device}=="0x43ed"
ATTRS{dma_mask_bits}=="64"
ATTRS{driver_override}=="(null)"
ATTRS{enable}=="1"
ATTRS{irq}=="126"
ATTRS{local_cpulist}=="0-11"
ATTRS{local_cpus}=="fff"
ATTRS{msi_bus}=="1"
ATTRS{msi_irqs/126}=="msi"
ATTRS{numa_node}=="-1"
ATTRS{power/control}=="on"
ATTRS{power/runtime_active_time}=="4050438"
ATTRS{power/runtime_status}=="active"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{power/wakeup}=="enabled"
ATTRS{power/wakeup_abort_count}=="0"
ATTRS{power/wakeup_active}=="0"
ATTRS{power/wakeup_active_count}=="0"
ATTRS{power/wakeup_count}=="0"
ATTRS{power/wakeup_expire_count}=="0"
ATTRS{power/wakeup_last_time_ms}=="0"
ATTRS{power/wakeup_max_time_ms}=="0"
ATTRS{power/wakeup_total_time_ms}=="0"
ATTRS{power_state}=="D0"
ATTRS{remove}=="(write-only)"
ATTRS{rescan}=="(write-only)"
ATTRS{revision}=="0x11"
ATTRS{subsystem_device}=="0x0a56"
ATTRS{subsystem_vendor}=="0x1028"
ATTRS{vendor}=="0x8086"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{waiting_for_supplier}=="0"
et finalement un test sur le device
# udevadm test --action="add" "/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0/tty/ttyACM0"
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
Trying to open "/etc/systemd/hwdb/hwdb.bin"...
Trying to open "/etc/udev/hwdb.bin"...
=== trie on-disk ===
tool version: 250
file size: 11996232 bytes
header size 80 bytes
strings 2442720 bytes
nodes 9553432 bytes
Load module index
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
Loaded timestamp for '/run/systemd/network'.
Parsed configuration file /usr/lib/systemd/network/99-default.link
Created link configuration context.
Loaded timestamp for '/etc/udev/rules.d'.
Reading rules file: /usr/lib/udev/rules.d/01-md-raid-creating.rules
Reading rules file: /usr/lib/udev/rules.d/10-dm.rules
Reading rules file: /usr/lib/udev/rules.d/11-dm-lvm.rules
Reading rules file: /usr/lib/udev/rules.d/11-dm-mpath.rules
Reading rules file: /usr/lib/udev/rules.d/11-dm-parts.rules
Reading rules file: /usr/lib/udev/rules.d/13-dm-disk.rules
Reading rules file: /usr/lib/udev/rules.d/40-elevator.rules
Reading rules file: /usr/lib/udev/rules.d/40-libgphoto2.rules
Reading rules file: /usr/lib/udev/rules.d/40-redhat.rules
Reading rules file: /usr/lib/udev/rules.d/40-usb-blacklist.rules
Reading rules file: /usr/lib/udev/rules.d/40-usb_modeswitch.rules
Reading rules file: /usr/lib/udev/rules.d/50-udev-default.rules
Reading rules file: /usr/lib/udev/rules.d/60-autosuspend.rules
Reading rules file: /usr/lib/udev/rules.d/60-block.rules
Reading rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules
Reading rules file: /usr/lib/udev/rules.d/60-drm.rules
Reading rules file: /usr/lib/udev/rules.d/60-evdev.rules
Reading rules file: /usr/lib/udev/rules.d/60-fido-id.rules
Reading rules file: /usr/lib/udev/rules.d/60-input-id.rules
Reading rules file: /usr/lib/udev/rules.d/60-net.rules
Reading rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules
Reading rules file: /usr/lib/udev/rules.d/60-persistent-input.rules
Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules
Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
Reading rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
Reading rules file: /usr/lib/udev/rules.d/60-sensor.rules
Reading rules file: /usr/lib/udev/rules.d/60-serial.rules
Reading rules file: /usr/lib/udev/rules.d/60-tpm-udev.rules
Reading rules file: /usr/lib/udev/rules.d/60_flashrom.rules
Reading rules file: /usr/lib/udev/rules.d/61-gdm.rules
Reading rules file: /usr/lib/udev/rules.d/61-gnome-bluetooth-rfkill.rules
Reading rules file: /usr/lib/udev/rules.d/61-gnome-settings-daemon-rfkill.rules
Reading rules file: /usr/lib/udev/rules.d/61-mutter.rules
Reading rules file: /usr/lib/udev/rules.d/61-scsi-sg3_id.rules
Reading rules file: /usr/lib/udev/rules.d/62-multipath.rules
Reading rules file: /usr/lib/udev/rules.d/63-fc-wwpn-id.rules
Reading rules file: /usr/lib/udev/rules.d/63-md-raid-arrays.rules
Reading rules file: /usr/lib/udev/rules.d/63-scsi-sg3_symlink.rules
Reading rules file: /usr/lib/udev/rules.d/64-btrfs.rules
Reading rules file: /usr/lib/udev/rules.d/64-md-raid-assembly.rules
Reading rules file: /usr/lib/udev/rules.d/65-libwacom.rules
Reading rules file: /usr/lib/udev/rules.d/65-md-incremental.rules
Reading rules file: /usr/lib/udev/rules.d/65-sane-backends.rules
Reading rules file: /usr/lib/udev/rules.d/65-scsi-cciss_id.rules
Reading rules file: /usr/lib/udev/rules.d/66-kpartx.rules
Reading rules file: /usr/lib/udev/rules.d/68-del-part-nodes.rules
Reading rules file: /usr/lib/udev/rules.d/69-cd-sensors.rules
Reading rules file: /usr/lib/udev/rules.d/69-dm-lvm.rules
Reading rules file: /usr/lib/udev/rules.d/69-libmtp.rules
Reading rules file: /usr/lib/udev/rules.d/69-md-clustered-confirm-device.rules
Reading rules file: /usr/lib/udev/rules.d/70-camera.rules
Reading rules file: /usr/lib/udev/rules.d/70-hypervfcopy.rules
Reading rules file: /usr/lib/udev/rules.d/70-hypervkvp.rules
Reading rules file: /usr/lib/udev/rules.d/70-hypervvss.rules
Reading rules file: /usr/lib/udev/rules.d/70-joystick.rules
Reading rules file: /usr/lib/udev/rules.d/70-libfprint-2.rules
Reading rules file: /usr/lib/udev/rules.d/70-memory.rules
Reading rules file: /usr/lib/udev/rules.d/70-mouse.rules
Reading rules file: /usr/lib/udev/rules.d/70-nvmf-autoconnect.rules
Reading rules file: /usr/lib/udev/rules.d/70-power-switch.rules
Reading rules file: /usr/lib/udev/rules.d/70-printers.rules
Reading rules file: /usr/lib/udev/rules.d/70-spice-vdagentd.rules
Reading rules file: /usr/lib/udev/rules.d/70-touchpad.rules
Reading rules file: /usr/lib/udev/rules.d/70-uaccess.rules
Reading rules file: /usr/lib/udev/rules.d/70-wacom.rules
Reading rules file: /usr/lib/udev/rules.d/71-nvmf-iopolicy-netapp.rules
Reading rules file: /usr/lib/udev/rules.d/71-prefixdevname.rules
Reading rules file: /usr/lib/udev/rules.d/71-seat.rules
Reading rules file: /usr/lib/udev/rules.d/73-seat-late.rules
Reading rules file: /usr/lib/udev/rules.d/75-net-description.rules
Reading rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-broadmobi-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-cinterion-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-dell-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-dlink-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-ericsson-mbm.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-fibocom-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-foxconn-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-gosuncn-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-haier-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-huawei-net-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-longcheer-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-mtk-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-nokia-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-quectel-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-sierra.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-simtech-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-telit-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-tplink-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-ublox-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-x22x-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/77-mm-zte-port-types.rules
Reading rules file: /usr/lib/udev/rules.d/78-sound-card.rules
Reading rules file: /usr/lib/udev/rules.d/80-drivers.rules
Reading rules file: /usr/lib/udev/rules.d/80-iio-sensor-proxy.rules
Reading rules file: /usr/lib/udev/rules.d/80-libinput-device-groups.rules
Reading rules file: /usr/lib/udev/rules.d/80-mm-candidate.rules
Reading rules file: /usr/lib/udev/rules.d/80-net-setup-link.rules
Reading rules file: /usr/lib/udev/rules.d/80-udisks2.rules
Reading rules file: /usr/lib/udev/rules.d/81-net-dhcp.rules
Reading rules file: /usr/lib/udev/rules.d/84-nm-drivers.rules
Reading rules file: /usr/lib/udev/rules.d/85-nm-unmanaged.rules
Reading rules file: /usr/lib/udev/rules.d/85-regulatory.rules
Reading rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules
Reading rules file: /usr/lib/udev/rules.d/90-bolt.rules
Reading rules file: /usr/lib/udev/rules.d/90-fwupd-devices.rules
Reading rules file: /usr/lib/udev/rules.d/90-iprutils.rules
Reading rules file: /usr/lib/udev/rules.d/90-libinput-fuzz-override.rules
Reading rules file: /usr/lib/udev/rules.d/90-nm-thunderbolt.rules
Reading rules file: /usr/lib/udev/rules.d/90-pipewire-alsa.rules
Reading rules file: /usr/lib/udev/rules.d/90-vconsole.rules
Reading rules file: /usr/lib/udev/rules.d/91-drm-modeset.rules
Reading rules file: /usr/lib/udev/rules.d/95-cd-devices.rules
Reading rules file: /usr/lib/udev/rules.d/95-dm-notify.rules
Reading rules file: /usr/lib/udev/rules.d/95-upower-hid.rules
Reading rules file: /usr/lib/udev/rules.d/95-upower-wup.rules
Reading rules file: /usr/lib/udev/rules.d/98-kexec.rules
Reading rules file: /usr/lib/udev/rules.d/99-qemu-guest-agent.rules
Reading rules file: /usr/lib/udev/rules.d/99-systemd.rules
Reading rules file: /usr/lib/udev/rules.d/99-vmware-scsi-udev.rules
Reading rules file: /etc/udev/rules.d/99-x2-daq-visu.rules
ttyACM0: /usr/lib/udev/rules.d/50-udev-default.rules:26 GROUP 18
ttyACM0: /usr/lib/udev/rules.d/60-serial.rules:7 Importing properties from results of builtin command 'hwdb --subsystem=pci'
ttyACM0: hwdb modalias key: "pci:v00008086d000043EDsv00001028sd00000A56bc0Csc03i30"
ttyACM0: /usr/lib/udev/rules.d/60-serial.rules:8 Importing properties from results of builtin command 'usb_id'
1-12:1.0: if_class:2 protocol:0
ttyACM0: /usr/lib/udev/rules.d/60-serial.rules:8 Importing properties from results of builtin command 'hwdb --subsystem=usb'
ttyACM0: hwdb modalias key: "usb:v04D8pFFEEd0100dc02dsc00dp00ic02isc02ip01in00"
ttyACM0: /usr/lib/udev/rules.d/60-serial.rules:15 Importing properties from results of builtin command 'path_id'
ttyACM0: /usr/lib/udev/rules.d/60-serial.rules:16 LINK 'serial/by-path/pci-0000:00:14.0-usb-0:12:1.0'
ttyACM0: /usr/lib/udev/rules.d/60-serial.rules:19 Skipping builtin 'usb_id' in IMPORT key
ttyACM0: /usr/lib/udev/rules.d/60-serial.rules:23 LINK 'serial/by-id/usb-Devantech_Ltd._USB-ISS._00051229-if00'
ttyACM0: Preserve permissions of /dev/ttyACM0, uid=0, gid=18, mode=0660
ttyACM0: Handling device node '/dev/ttyACM0', devnum=c166:0
ttyACM0: sd-device: Created db file '/run/udev/data/c166:0' for '/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0/tty/ttyACM0'
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0/tty/ttyACM0
DEVNAME=/dev/ttyACM0
MAJOR=166
MINOR=0
ACTION=add
SUBSYSTEM=tty
TAGS=:systemd:
ID_BUS=usb
ID_VENDOR_ID=04d8
ID_MODEL_ID=ffee
ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
ID_PCI_INTERFACE_FROM_DATABASE=XHCI
ID_VENDOR_FROM_DATABASE=Microchip Technology, Inc.
ID_MODEL_FROM_DATABASE=Devantech USB-ISS
ID_VENDOR=Devantech_Ltd.
ID_VENDOR_ENC=Devantech\x20Ltd.
ID_MODEL=USB-ISS.
ID_MODEL_ENC=USB-ISS.
ID_REVISION=0100
ID_SERIAL=Devantech_Ltd._USB-ISS._00051229
ID_SERIAL_SHORT=00051229
ID_TYPE=generic
ID_USB_INTERFACES=:020201:0a0000:
ID_USB_INTERFACE_NUM=00
ID_USB_DRIVER=cdc_acm
ID_USB_CLASS_FROM_DATABASE=Communications
ID_PATH=pci-0000:00:14.0-usb-0:12:1.0
ID_PATH_TAG=pci-0000_00_14_0-usb-0_12_1_0
DEVLINKS=/dev/serial/by-path/pci-0000:00:14.0-usb-0:12:1.0 /dev/serial/by-id/usb-Devantech_Ltd._USB-ISS._00051229-if00
ID_MM_CANDIDATE=1
CURRENT_TAGS=:systemd:
USEC_INITIALIZED=3036159759
Unload module index
Unloaded link configuration context.
Je ne comprends pas pourquoi ça ne fonctionne pas sur alma alors que ça marche partout ailleurs.
Merci d'avance pour votre aide.
Olivier
# Match différent, histoire de…
Posté par Cyril Brulebois (site web personnel) . Évalué à 3.
Si tu matches sur
ENV{ID_SERIAL_SHORT}=="XXXX"
au lieu deATTRS{serial}=="XXXX"
?On voit bien
ATTRS{serial}=="00051229"
apparaître dans ton dump, mais sur le grand-parent uniquement, du coup je ne suis pas sûr que la combinaison donnée dans la règle udev attrape quoi que ce soit ?Debian Consultant @ DEBAMAX
[^] # Re: Match différent, histoire de…
Posté par Olivier LEMAIRE (site web personnel) . Évalué à 1.
Bonjour et merci pour ta réponse. C'est étrange que ça fonctionne sur mon pc perso qui est sous Fedora et d'autres machine (debian, ubuntu).
Mais je vais essayer :)
Les logiciels de traitement de texte sont à la rédaction ce que la 2CV est à l'automobile, une vieille voiture dont on se souvient avec nostalgie mais technologiquement dépassée
[^] # Re: Match différent, histoire de…
Posté par Cyril Brulebois (site web personnel) . Évalué à 3.
Si tu veux le fin mot de l'histoire, tu peux comparer les versions d'udev (systemd) entre les différents systèmes, cela pourrait te donner des pistes.
Un exemple parmi d'autres (parcours rapide de mon historique Firefox) : https://github.com/systemd/systemd/issues/8221 (ici il s'agit d'une différence sur le traitement d'événements mais le résultat est le même, dans deux versions différentes, le même fichier de règle se met à ne plus faire ce qu'il faisait…).
Debian Consultant @ DEBAMAX
[^] # Re: Match différent, histoire de…
Posté par Olivier LEMAIRE (site web personnel) . Évalué à 1.
J'ai essayé, mais rien n'y fait… avec ce dongle en particulier.
J'ai essayé avec d'autres dongles qui sont aussi dans le fichier et dont voici les règles
Ça fonctionne pour tous ces devices.
Ce qui encore plus troublant, c'est que j'ai une 2e machine identique, exactement la même configuration matérielle, le même OS, le même fichier de règles, et bien la règle pour le dongle ttyshaper est détectée…
Les logiciels de traitement de texte sont à la rédaction ce que la 2CV est à l'automobile, une vieille voiture dont on se souvient avec nostalgie mais technologiquement dépassée
# Faut pas mélanger
Posté par gUI (Mastodon) . Évalué à 5. Dernière modification le 13 janvier 2023 à 19:18.
Quand j'avais eu à faire des règles à peu près dans le même contexte, il me semble avoir compris que tu peux pas dans une règle mélanger les "niveaux" des informations que tu utilises.
Par exemple si tu cherches ton numéro de série
ATTRS{serial}=="00051229"
tu le vois dans un lot de données où tu n'as pasSUBSYSTEMS=="tty"
maisSUBSYSTEMS=="usb"
Donc dans ta règle tu dois mettre
SUBSYSTEMS=="usb"
Bon, je garantis rien, c'est ce qu'il m'avait semblé avoir compris…
En théorie, la théorie et la pratique c'est pareil. En pratique c'est pas vrai.
Suivre le flux des commentaires
Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.