You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
2.8 KiB
36 lines
2.8 KiB
# UDEV rules for USB devices - ENV variables can be monitored
|
|
# via 'sudo udevadm monitor --udev --subsystem-match=usb --property'
|
|
# Low-level USB device add trigger
|
|
#ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", ENV{ID_USB_INTERFACES}!="*:070104:*", TAG+="systemd", ENV{SYSTEMD_WANTS}="configure-printer@usb-$env{BUSNUM}-$env{DEVNUM}.service"
|
|
# Low-level USB device remove trigger
|
|
# Interface types:
|
|
# 7/1/1 - device with unidirectional USB, managed by usb backend
|
|
# 7/1/2 - device with bidirectional USB, managed by usb backend
|
|
# 7/1/3 - device with special USB protocol, managed by hp backend
|
|
# 7/1/4 - device with IPP over USB protocol, managed by ipp-usb daemon
|
|
#ACTION=="remove", SUBSYSTEM=="usb", ENV{INTERFACE}=="7/1/*", ENV{INTERFACE}!="7/1/4", RUN+="udev-configure-printer remove %p"
|
|
|
|
#ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'"
|
|
#SUBSYSTEM=="block", ATTRS{idVendor}=="03f0", ACTION=="add", RUN+="/usr/lib/ublinux/cups-printers.sh"
|
|
|
|
# Lulzbot TAZ Pro in Bootloader mode (for flashing firmware)
|
|
#SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", ENV{ID_MAKER_TOOL}="1"
|
|
# The following rule can be removed once the systemd upstream support will get
|
|
# widely adopted (IMHO it should be safe to remove in 2017+)
|
|
# https://github.com/systemd/systemd/pull/2844
|
|
#ENV{ID_MAKER_TOOL}=="?*", TAG+="uaccess"
|
|
|
|
# Load hp firmware for this printer.
|
|
#ACTION!="add", GOTO="hpmud_rules_end"
|
|
# hp_laserjet_p1006 for Suse 10.3
|
|
#SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="3e17", PROGRAM="/bin/sh -c 'logger -p user.info loading hp_laserjet_p1006 firmware $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/hp-firmware -y3 -s$env{BUSNUM}:$env{DEVNUM} &'"
|
|
# hp_laserjet_p1006
|
|
#SUBSYSTEM=="usb_device", SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="3e17", PROGRAM="/bin/sh -c 'X=%k; X=$${X#usbdev}; B=$${X%%%%.*}; D=$${X#*.}; logger -p user.info loading hp_laserjet_p1006 firmware $$B $$D; printf %%03i:%%03i $$B $$D'", RUN+="/bin/sh -c '/usr/bin/hp-firmware -y3 -s%c &'"
|
|
#LABEL="hpmud_rules_end"
|
|
|
|
|
|
#KERNEL=="lp*", ACTION=="add|remove", RUN+="/bin/bash -c /usr/lib/ublinux/scripts/udev-cups-printers.sh"
|
|
#ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="c12a", RUN+="/bin/bash -c /usr/lib/ublinux/scripts/udev-cups-printers.sh"
|
|
#ACTION=="add", SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="c12a", RUN+="/bin/bash -c /usr/lib/ublinux/scripts/udev-cups-printers.sh"
|
|
ACTION=="add|remove", SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", RUN+="/bin/bash -c /usr/lib/ublinux/scripts/udev-cups-printers.sh"
|