summaryrefslogtreecommitdiff
path: root/src/systemd-analyze
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2012-02-21 21:04:05 +0100
committerKay Sievers <kay.sievers@vrfy.org>2012-02-21 21:04:05 +0100
commite444cbf040bf9e532a18a4d80bcbc4a49e6a1b21 (patch)
treed9be70d7e70c79558b64420155289c2d405d42ca /src/systemd-analyze
parentd0e5a33374cee92962af33dfc03873e470b014f6 (diff)
systemd-analyze: read /etc/os-release
Diffstat (limited to 'src/systemd-analyze')
-rwxr-xr-xsrc/systemd-analyze10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/systemd-analyze b/src/systemd-analyze
index 729aa05ca1..dad2ab8d1f 100755
--- a/src/systemd-analyze
+++ b/src/systemd-analyze
@@ -164,7 +164,15 @@ elif sys.argv[1] == 'plot':
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):