Skip to contentSkip to conversation

fix for a bash issue regarding a variable in update-pciids

PATCH New Christian Inci 1 participant 1 message Dec 23, 2011 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix for a bash issue regarding a variable in update-pciids

Quoted 1 line

From f9d728aa77fc53189f750286b327361a707f0533 Mon Sep 17 00:00:00 2001

From: Christian Inci <[email protected]>
Date: Fri, 23 Dec 2011 01:13:16 +0100
Subject: [PATCH] fix for a bash issue regarding a variable in update-pciids
At least some bash versions can and will complain about an empty PCI_COMPRESSED_IDS variable, when it get used in the 'if'-statement.

e.g. with a message like:
"/usr/sbin/update-pciids: line 18: [: : integer expression expected"

---
 update-pciids.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
update-pciids.sh +1 -1
index 5e77109..708e3b3 100755
@@ -5,7 +5,7 @@
 set -e
 SRC="http://pciids.sourceforge.net/v2.2/pci.ids"
 DEST=pci.ids
-PCI_COMPRESSED_IDS=
+PCI_COMPRESSED_IDS=0
 GREP=grep
 
 # if pci.ids is read-only (because the filesystem is read-only),
Signature · 1 line
1.7.7.4