[systemd-devel] [PATCH] analyze: Cosmetic exit when the bootup is not yet complete when plotting.
Lennart Poettering
lennart at poettering.net
Mon Apr 2 13:12:37 PDT 2012
On Mon, 02.04.12 11:08, Colin Guthrie (colin at mageia.org) wrote:
> This is just a nicer message than a python traceback.
Thanks!
Applied.
> ---
> src/systemd-analyze | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/systemd-analyze b/src/systemd-analyze
> index 8148bfb..a49fbb7 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
>
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list