2016-06-06 11:18:58 +02:00
diff -ur hplip-3.16.5-orig/data/rules/56-hpmud.rules hplip-3.16.5/data/rules/56-hpmud.rules
--- hplip-3.16.5-orig/data/rules/56-hpmud.rules 2016-05-04 07:23:21.000000000 +0200
+++ hplip-3.16.5/data/rules/56-hpmud.rules 2016-06-06 09:04:05.828185741 +0200
@@ -1,8 +1,33 @@
2013-07-12 14:20:30 +02:00
# HPLIP udev rules file. Notify console user if plugin support is required for this device.
2015-06-24 16:13:45 +02:00
+#
2011-08-12 12:38:08 +02:00
+# SUSE changed:
2009-08-13 22:54:24 +02:00
+#
2013-07-12 14:20:30 +02:00
+# Exchanged the rule to GOTO hpmud_usb_rules if SUBSYSTEM is "usb"
+# with the rule if SUBSYSTEM is "ppdev" to avoid that the "ppdev" rule
+# is needlessly processed when SUBSYSTEM is "usb".
2010-09-15 16:06:47 +02:00
+#
2013-10-17 17:47:40 +02:00
+# Added GOTO hpmud_rules_end rule to skip the hpmud_usb_rules
+# if SUBSYSTEM is not "usb" or if ENV{DEVTYPE} is not "usb_device" or if SUBSYSTEM is not "ppdev"
2013-07-12 14:20:30 +02:00
+# to avoid that the hpmud_usb_rules are needlessly processed.
2010-09-15 16:06:47 +02:00
+#
2015-06-24 16:13:45 +02:00
+# The rule to automatically "check ... plugin status" is disabled
2013-07-12 14:20:30 +02:00
+# because automated installation of non-free proprietary third-party software
+# (here the plugin from HP) should not happen and it can cause whatever kind
+# of strange behaviour see for example https://bugs.launchpad.net/bugs/1197416
2013-09-10 17:18:55 +02:00
+# and https://bugs.launchpad.net/bugs/1221348
2013-07-12 14:20:30 +02:00
+# while in contrast manual printer setup via hp-setup usually "just works"
+# and it is clear for the user what goes on and in case of failure what went wrong.
2013-09-10 17:18:55 +02:00
+#
2015-06-24 16:13:45 +02:00
+# Because the rule to automatically "check ... plugin status"
2013-09-10 17:18:55 +02:00
+# is also used to upload firmware into printers that need it
+# see https://bugs.launchpad.net/bugs/1220628
+# a rule that only uploads firmware into printers that need it is added.
2015-06-24 16:13:45 +02:00
+#
+# If possible activate hpaio backend support in /etc/sane.d/dll.conf.
2014-04-01 14:09:12 +02:00
2007-07-05 01:02:54 +02:00
ACTION!="add", GOTO="hpmud_rules_end"
2013-10-17 17:47:40 +02:00
-SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0664"
2013-07-12 14:20:30 +02:00
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="hpmud_usb_rules"
2008-02-22 01:30:29 +01:00
+SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0664"
2016-06-06 11:18:58 +02:00
GOTO="hpmud_rules_end"
2007-10-24 01:50:18 +02:00
2013-07-12 14:20:30 +02:00
LABEL="hpmud_usb_rules"
2016-06-06 11:18:58 +02:00
@@ -13,6 +38,12 @@
2015-06-24 16:13:45 +02:00
ATTR{idVendor}=="03f0", ENV{ID_USB_INTERFACES}=="*:0701??:*|*:08????:", OWNER="root", GROUP="lp", MODE="0664", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
2009-06-02 17:38:37 +02:00
2014-10-27 12:44:01 +01:00
# This rule will check the smart install feature, plugin status and firmware download for the required printers.
2015-06-24 16:13:45 +02:00
-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}'"
+#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}'"
2013-09-10 17:18:55 +02:00
+# This rule uploads firmware to HP USB printer devices if needed:
+ENV{hp_test}=="yes", PROGRAM="/bin/logger -p user.info udev hpmud.rules runs hp-firmware to test if HP device with USB vendor ID $attr{idVendor} and USB product ID $attr{idProduct} at USB bus ID $env{BUSNUM} and USB device ID $env{DEVNUM} needs firmware and if yes to upload it", RUN+="/usr/bin/hp-firmware -s $env{BUSNUM}:$env{DEVNUM}"
2015-06-24 16:13:45 +02:00
+
+# If possible activate hpaio backend support in /etc/sane.d/dll.conf:
+ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'if test -w /etc/sane.d/dll.conf ; then sed -i -e /hpaio/d /etc/sane.d/dll.conf ; echo hpaio >>/etc/sane.d/dll.conf ; fi'"
2007-10-24 01:50:18 +02:00
2015-06-24 16:13:45 +02:00
LABEL="hpmud_rules_end"
+