/[smeserver]/rpms/smolt/sme7/smolt-0.9.8.1-sme.patch2
ViewVC logotype

Annotation of /rpms/smolt/sme7/smolt-0.9.8.1-sme.patch2

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Thu Mar 4 00:49:44 2010 UTC (14 years, 9 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Upgrade

1 slords 1.1 diff -Nur -x '*.orig' -x '*.rej' smolt-0.9.8.1/client/smolt.py mezzanine_patched_smolt-0.9.8.1/client/smolt.py
2     --- smolt-0.9.8.1/client/smolt.py 2007-06-07 10:32:03.000000000 -0600
3     +++ mezzanine_patched_smolt-0.9.8.1/client/smolt.py 2007-06-07 10:31:16.000000000 -0600
4     @@ -41,6 +41,9 @@
5     from urlparse import urljoin
6     from urllib import urlencode
7    
8     +import os
9     +import commands
10     +
11     smoonURL = 'http://smolt.smeserverpro.com/'
12     smoltProtocol = '.91'
13     user_agent = 'smolt/%s' % smoltProtocol
14     @@ -210,17 +213,19 @@
15     ignore = 1
16     if device.bus == 'Unknown' or device.bus == 'unknown':
17     return 1
18     - if device.bus == 'block' or device.bus == 'ide':
19     - return 1
20     - if device.bus == 'usb' and device.type == None:
21     - return 1
22     - if device.bus == 'usb' and device.type == 'OTHER':
23     + if device.vendorid in (0, None) and device.type == None:
24     return 1
25     if device.bus == 'usb' and device.driver == 'hub':
26     return 1
27     + if device.bus == 'usb' and 'Hub' in device.description:
28     + return 1
29     if device.bus == 'sound' and device.driver == 'Unknown':
30     return 1
31     - if device.bus == 'pnp' and (device.driver == 'Unknown' or device.driver == 'system'):
32     + if device.bus == 'pnp' and device.driver in ('Unknown', 'system'):
33     + return 1
34     + if device.bus == 'block' and device.type == 'DISK':
35     + return 1
36     + if device.bus == 'usb_device' and device.type == None:
37     return 1
38     return 0
39    
40     @@ -280,6 +285,60 @@
41     props = dev.GetAllProperties()
42     self.devices[udi] = Device(props)
43     if udi == '/org/freedesktop/Hal/devices/computer':
44     + status, systemType = commands.getstatusoutput("config gettype SystemMode")
45     + if status == 0:
46     + props['system.formfactor'] = systemType
47     + try:
48     + vendor = props['system.vendor']
49     + if len(vendor.strip()) == 0:
50     + vendor = None
51     + except KeyError:
52     + try:
53     + vendor = props['vendor']
54     + if len(vendor.strip()) == 0:
55     + vendor = None
56     + except KeyError:
57     + vendor = None
58     + try:
59     + product = props['system.product']
60     + if len(product.strip()) == 0:
61     + product = None
62     + except KeyError:
63     + try:
64     + product = props['product']
65     + if len(product.strip()) == 0:
66     + product = None
67     + except KeyError:
68     + product = None
69     + if vendor is None or product is None:
70     + dmiOutput = os.popen("dmidecode", "r")
71     + section = None
72     + sysvendor = None
73     + sysproduct = None
74     + boardvendor = None
75     + boardproduct = None
76     + for line in dmiOutput:
77     + line = line.strip()
78     + if "Information" in line:
79     + section = line
80     + elif section is None:
81     + continue
82     + elif line.startswith("Manufacturer: ") and section.startswith("System"):
83     + sysvendor = line.split("Manufacturer: ", 1)[1]
84     + elif line.startswith("Product Name: ") and section.startswith("System"):
85     + sysproduct = line.split("Product Name: ", 1)[1]
86     + elif line.startswith("Manufacturer: ") and section.startswith("Base Board"):
87     + boardvendor = line.split("Manufacturer: ", 1)[1]
88     + elif line.startswith("Product Name: ") and section.startswith("Base Board"):
89     + boardproduct = line.split("Product Name: ", 1)[1]
90     + status = dmiOutput.close()
91     + if status is None:
92     + if sysvendor not in (None, 'System Manufacturer') and sysproduct not in (None, 'System Name'):
93     + props['system.vendor'] = sysvendor
94     + props['system.product'] = sysproduct
95     + elif boardproduct is not None and boardproduct is not None:
96     + props['system.vendor'] = boardvendor
97     + props['system.product'] = boardproduct
98     self.host = Host(props)
99     self.hostSendString = urlencode({
100     'UUID' : self.host.UUID,
101     @@ -511,18 +570,7 @@
102     return 'SOCKET'
103    
104     if node.has_key('storage.drive_type'):
105     - #CDROM
106     - if node['storage.drive_type'] == 'cdrom':
107     - return 'CDROM'
108     - #HD
109     - if node['storage.drive_type'] == 'disk':
110     - return 'HD'
111     - #FLOPPY
112     - if node['storage.drive_type'] == 'floppy':
113     - return 'FLOPPY'
114     - #TAPE
115     - if node['storage.drive_type'] == 'tape':
116     - return 'TAPE'
117     + return node['storage.drive_type'].upper()
118    
119     #PRINTER
120     if node.has_key('printer.product'):
121     diff -Nur -x '*.orig' -x '*.rej' smolt-0.9.8.1/smoon/hardware/templates/stats.kid mezzanine_patched_smolt-0.9.8.1/smoon/hardware/templates/stats.kid
122     --- smolt-0.9.8.1/smoon/hardware/templates/stats.kid 2007-05-24 12:54:23.000000000 -0600
123     +++ mezzanine_patched_smolt-0.9.8.1/smoon/hardware/templates/stats.kid 2007-06-07 10:31:52.000000000 -0600
124     @@ -142,7 +142,7 @@
125     </tr>
126     </table>
127     </div>
128     - <div class="tabbertab"><h2>kernel</h2>
129     + <div class="tabbertab"><h2>Kernel</h2>
130     <table id="stats" width="100%" border="0" cellpadding="3" cellspacing="3">
131     <tr py:for='kernelVersion in Stat["kernelVersion"]'>
132     <th align="right">${kernelVersion[0]}</th>
133     @@ -152,7 +152,7 @@
134     </tr>
135     </table>
136     </div>
137     - <div class="tabbertab"><h2>type</h2>
138     + <div class="tabbertab"><h2>Type</h2>
139     <table id="stats" width="100%" border="0" cellpadding="3" cellspacing="3">
140     <tr py:for='formfactor in Stat["formfactor"]'>
141     <th align="right">${formfactor[0]}</th>

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed