diff options
author | Colin Guthrie <colin@mageia.org> | 2012-04-02 11:08:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-04-02 22:12:35 +0200 |
commit | 6070fe66ac2f317e7e85e5685f0916d1e2b73a28 (patch) | |
tree | a32a723669c9fc74572126e2fc791ce1d40bccc6 /src/systemd-analyze | |
parent | 60089004254c68173c4e3a2ca2eda0b6102ba96f (diff) |
analyze: Cosmetic exit when the bootup is not yet complete when plotting.
This is just a nicer message than a python traceback.
Diffstat (limited to 'src/systemd-analyze')
-rwxr-xr-x | src/systemd-analyze | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemd-analyze b/src/systemd-analyze index 8148bfb832..a49fbb7eb0 100755 --- a/src/systemd-analyze +++ b/src/systemd-analyze @@ -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 |