chiark / gitweb /
analyze: Cosmetic exit when the bootup is not yet complete when plotting.
authorColin Guthrie <colin@mageia.org>
Mon, 2 Apr 2012 10:08:20 +0000 (11:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Apr 2012 20:12:35 +0000 (22:12 +0200)
This is just a nicer message than a python traceback.

src/systemd-analyze

index 8148bfb832c63e903ae5d7345d91a57a84ce64eb..a49fbb7eb057cac4685294767a9e51e2434b9e56 100755 (executable)
@@ -31,6 +31,10 @@ def acquire_start_time():
         startup_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'StartupTimestampMonotonic'))
         finish_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'FinishTimestampMonotonic'))
 
+        if finish_time == 0:
+                sys.stderr.write("Bootup is not yet finished. Please try again later.\n")
+                sys.exit(1)
+
         assert initrd_time <= startup_time
         assert startup_time <= finish_time