mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +00:00
test: Update udev fixture to match query patterns
This commit is contained in:
parent
14037eaeb8
commit
22f1703bee
1 changed files with 20 additions and 6 deletions
26
tests/fixtures/languages/udev/test.rules
vendored
26
tests/fixtures/languages/udev/test.rules
vendored
|
@ -1,8 +1,22 @@
|
|||
# udev rules for custom USB device
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", GROUP="plugdev", MODE="0666"
|
||||
# Define a label for a specific device
|
||||
LABEL="my_usb_device", ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678"
|
||||
|
||||
# Rule for disk device
|
||||
SUBSYSTEM=="block", KERNEL=="sd[a-z]", ATTRS{vendor}=="SanDisk", SYMLINK+="sandisk_drive"
|
||||
# Reference a label in a GOTO
|
||||
SUBSYSTEM=="usb", GOTO="my_peripheral"
|
||||
|
||||
# Run a script when a specific device is connected
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="abcd", ATTRS{idProduct}=="ef01", RUN+="/usr/local/bin/device_script.sh"
|
||||
# Define environment variables
|
||||
ENV{DEVTYPE}="usb_device"
|
||||
ENV{USB_DRIVER}="usb-storage"
|
||||
|
||||
# Reference environment variables
|
||||
ENV{DEVTYPE}=="usb_device", SYMLINK+="usb_storage_%k"
|
||||
|
||||
# Variable substitution
|
||||
SYMLINK+="disk/by-label/$env{ID_FS_LABEL}"
|
||||
|
||||
# Label for a section of rules
|
||||
LABEL="my_peripheral"
|
||||
SUBSYSTEM=="usb", MODE="0666"
|
||||
|
||||
# End label
|
||||
LABEL="end_my_rules"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue