summaryrefslogtreecommitdiff
path: root/debian/patches/0019-The-firmware-upload-script-tried-to-upload-the-firmw.patch
blob: 6613779ede40d40ad567ab422cb21e00a1cbb558 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 793483305be8ca82acaa091d65047d48f8da3643 Mon Sep 17 00:00:00 2001
From: Till Kamppeter <till.kamppeter@gmail.com>
Date: Tue, 4 Oct 2016 11:44:02 +0200
Subject: The firmware upload script tried to upload the firmware via

 the usblp kernel module and with the CUPS USB backend (using libusb) in
 parallel, making the printer crash.
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1003843
---
 hplj1000 | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/hplj1000 b/hplj1000
index 6bc0d18..2cd24b9 100755
--- a/hplj1000
+++ b/hplj1000
@@ -262,8 +262,14 @@ if [ "$DEV" != "" ]; then
     # force downloading to a specific device
     #
     load_usblp "$DEV"
-elif [ -x $PRINTERID -o -x $USB_BACKEND ]; then
-    if [ -x $PRINTERID ]; then
+elif [ -x $USB_BACKEND ]; then
+        #
+        # If we have CUPS installed, use the CUPS "usb" backend, as then we do
+        # not need to care whether the system uses the usblp kernel module or
+        # libusb 
+        #
+        load_cups
+elif [ -x $PRINTERID ]; then
 	#
 	# Sniff around for printers that need a firmware download
 	#
@@ -282,20 +288,6 @@ elif [ -x $PRINTERID -o -x $USB_BACKEND ]; then
 		fi
 	    fi
 	done
-	if [ "$usblps" != " " ]; then
-	    # All done!
-	    exit
-	fi
-    fi
-
-    if [ -x $USB_BACKEND ]; then
-	#
-	# If we have CUPS installed, use the CUPS "usb" backend, as then we do
-	# not need to care whether the system uses the usblp kernel module or
-	# libusb
-	#
-	load_cups
-    fi
 else
     log "HP LaserJet $MODEL firmware was not downloaded..."
     log "...couldn't find $PRINTERID, DEV is not set, and CUPS not installed."