summaryrefslogtreecommitdiff
blob: 1820f8207a7398f90beb524bf5cb4bce6f8fac95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/client/config.py
+++ b/client/config.py
@@ -14,6 +14,7 @@ PUB_UUID = "/etc/smolt/pub-uuid"
 PUB_UUID = "/etc/smolt/pub-uuid"
 #UUID_DB = "/etc/smolt/uuiddb.cfg"
 #ADMIN_TOKEN = "/etc/sysconfig/smolt-token"
+#HWDATA_DIR = "/usr/share/hwdata"
 
 
 #These are the defaults taken from the source code.
--- a/client/hwdata.py
+++ b/client/hwdata.py
@@ -20,7 +20,8 @@ class DeviceMap:
         self.vendors['usb'] = self.device_map('usb')
 
     def device_map(self, bus='pci'):
-        fn = "/usr/share/hwdata/%s.ids" % bus
+        from smolt import get_config_attr
+        fn = "%s/%s.ids" % (get_config_attr("HWDATA_DIR", "/usr/share/hwdata"), bus)
         fo = open(fn, 'r')
         vendors = {}
         curvendor = None