From: Colin Guthrie Date: Mon, 2 Apr 2012 10:08:20 +0000 (+0100) Subject: analyze: Cosmetic exit when the bootup is not yet complete when plotting. X-Git-Tag: debian/247.3-7+deb11u1~2386^2^2~3468 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6070fe66ac2f317e7e85e5685f0916d1e2b73a28;p=systemd.git analyze: Cosmetic exit when the bootup is not yet complete when plotting. This is just a nicer message than a python traceback. --- diff --git a/src/systemd-analyze b/src/systemd-analyze index 8148bfb83..a49fbb7eb 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