SILENT fix udev rules patch

This commit is contained in:
akdengi 2013-11-20 11:47:03 +04:00
parent c81e2ba9e9
commit 3f90cd84fb

View file

@ -1,15 +1,3 @@
diff -up hplip-3.13.6/data/rules/56-hpmud.rules.udev-rules hplip-3.13.6/data/rules/56-hpmud.rules
--- hplip-3.13.6/data/rules/56-hpmud.rules.udev-rules 2013-06-24 10:28:19.865301396 +0200
+++ hplip-3.13.6/data/rules/56-hpmud.rules 2013-06-24 10:31:21.283926852 +0200
@@ -11,8 +11,6 @@ LABEL="hpmud_usb_rules"
ATTR{idVendor}=="03f0", ATTR{idProduct}=="????", OWNER="root", GROUP="lp", MODE="0660", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
-# This rule will add the printer and install plugin
-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/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'"
# If sane-bankends is installed add hpaio backend support to dll.conf if needed.
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'"
diff -up hplip-3.13.6/Makefile.in.udev-rules hplip-3.13.6/Makefile.in
--- hplip-3.13.6/Makefile.in.udev-rules 2013-06-24 10:28:19.868301356 +0200
+++ hplip-3.13.6/Makefile.in 2013-06-24 10:32:21.272134161 +0200
@ -22,3 +10,14 @@ diff -up hplip-3.13.6/Makefile.in.udev-rules hplip-3.13.6/Makefile.in
@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@dist_rules_DATA = data/rules/56-hpmud.rules
@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@dist_rules_DATA = data/rules/56-hpmud_sysfs.rules
@HPLIP_BUILD_TRUE@halpredir = /usr/share/hal/fdi/preprobe/10osvendor
--- a/data/rules/56-hpmud.rules 2013-10-31 15:45:33.000000000 +0400
+++ b/data/rules/56-hpmud.rules 2013-11-20 11:38:22.450960048 +0400
@@ -12,7 +12,7 @@
# This rule will add the printer and install plugin
-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/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'"
+# 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/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'"
# If sane-bankends is installed add hpaio backend support to dll.conf if needed.
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'"