summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordennis@daedalus.ausil.us <>2007-01-26 20:25:35 (GMT)
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2007-01-26 20:25:35 (GMT)
commit172096937054124833e39793d7f2d56bd5c7154f (patch)
tree24307c4ebd02f66e4448d14e8b187aa3fb5ab856
parentf31fd79ff8eefe1d20cab824e2ed993ddb353a66 (diff)
downloadsmolt-172096937054124833e39793d7f2d56bd5c7154f.zip
smolt-172096937054124833e39793d7f2d56bd5c7154f.tar.gz
smolt-172096937054124833e39793d7f2d56bd5c7154f.tar.xz
change system to pull from /proc/openprom/banner-name not /proc/openprom/name its a prettier name
-rw-r--r--hw-client/hardware.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/hw-client/hardware.py b/hw-client/hardware.py
index 820e450..31c238a 100644
--- a/hw-client/hardware.py
+++ b/hw-client/hardware.py
@@ -558,12 +558,10 @@ def read_cpuinfo():
continue
tmpdict[string.lower(name)] = string.lower(value)
system = ''
- if not os.access("/proc/openprom/name", os.R_OK):
+ if not os.access("/proc/openprom/banner-name", os.R_OK):
system = 'Unknown'
- if os.access("/proc/openprom/name", os.R_OK):
- sys = open("/proc/openprom/name", "r").read()
- syspart = string.split(sys, ",")
- system = syspart[1]
+ if os.access("/proc/openprom/banner-name", os.R_OK):
+ system = open("/proc/openprom/banner-name", "r").read()
hwdict['platform'] = uname
hwdict['count'] = get_entry(tmpdict, 'ncpus probed')
hwdict['model'] = get_entry(tmpdict, 'cpu')