"Fossies" - the Fresh Open Source Software Archive

Member "hplip-3.23.12/data/rules/56-hpmud_sysfs.rules" (27 Nov 2023, 1808 Bytes) of package /linux/misc/hplip-3.23.12.tar.gz:

As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.

    1 # HPLIP udev rules file. Notify console user if plugin support is required for this device.
    3 ACTION!="add", GOTO="hpmud_rules_end"
    4 SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0666"
    5 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="hpmud_usb_rules"
    8 LABEL="hpmud_usb_rules"
   10 # ENV{ID_HPLIP}="1" is for Ubuntu udev-acl
   11 # SYSFS is for RHEL 5, Centos 5. RHEL 5 requires 'rw-rw-rw-' permissions to setup.
   12 SYSFS{idVendor}=="03f0", SYSFS{idProduct}=="????", OWNER="root", GROUP="lp", MODE="0666", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
   14 # For RHEL 5, centos 5..
   15 ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'X=%k; X=$${X#usbdev}; B=$${X%%%%.*}; D=$${X#*.}; logger -p user.info loading HP Device $$B $$D; printf %%03i:%%03i $$B $$D'", RUN+="/bin/sh -c '/usr/bin/python hp-config_usb_printer %c '"
   17 # This rule will add the printer and install plugin
   18 ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/python /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi &'"
   20 # If sane-bankends is installed add hpaio backend support to dll.conf if needed.
   21 ENV{sane_hpaio}=="yes", RUN+="/bin/sh -c 'grep -q ^#hpaio /etc/sane.d/dll.conf;if [ $$? -eq 0 ];then sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf;else grep -q ^hpaio /etc/sane.d/dll.conf;if [ $$? -ne 0 ];then echo hpaio >>/etc/sane.d/dll.conf;fi;fi'"
   23 # The following rule will disable USB autosuspend for the device
   24 ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'test -e /sys/$env{DEVPATH}/power/level && echo on > /sys/$env{DEVPATH}/power/level'"
   27 LABEL="hpmud_rules_end"