chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d0e5a33
)
systemd-analyze: read /etc/os-release
author
Kay Sievers
<kay.sievers@vrfy.org>
Tue, 21 Feb 2012 20:04:05 +0000
(21:04 +0100)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Tue, 21 Feb 2012 20:04:05 +0000
(21:04 +0100)
src/systemd-analyze
patch
|
blob
|
history
diff --git
a/src/systemd-analyze
b/src/systemd-analyze
index 729aa05ca10a806a0944c8fd294ae9759ca55d19..dad2ab8d1fa89f3839507d49fd3190d259d1af61 100755
(executable)
--- a/
src/systemd-analyze
+++ b/
src/systemd-analyze
@@
-164,7
+164,15
@@
elif sys.argv[1] == 'plot':
context.stroke()
context.restore()
context.stroke()
context.restore()
- banner = "Running on %s (%s %s) %s" % (os.uname()[1], os.uname()[2], os.uname()[3], os.uname()[4])
+ osrel = "Linux"
+ if os.path.exists("/etc/os-release"):
+ for line in open("/etc/os-release"):
+ if line.startswith('PRETTY_NAME='):
+ osrel = line[12:]
+ osrel = osrel.strip('\"\n')
+ break
+
+ banner = "%s %s (%s %s) %s" % (osrel, os.uname()[1], os.uname()[2], os.uname()[3], os.uname()[4])
draw_text(context, 0, -15, banner, hcenter = 0, vcenter = 1)
for x in range(0, finish_time/10000 + 100, 100):
draw_text(context, 0, -15, banner, hcenter = 0, vcenter = 1)
for x in range(0, finish_time/10000 + 100, 100):