]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[main] Save progress cache file earlier
authorRay Strode <rstrode@redhat.com>
Thu, 6 May 2010 14:57:33 +0000 (10:57 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 6 May 2010 14:57:33 +0000 (10:57 -0400)
The cache file record milestones during boot, so we should
write it out:

1) only after the root filesystem is mounted
2) as soon as we're no longer going to get updates about boot
   progress.

src/main.c

index 13fed2b6d108a3ebaf3cb1cbd39b52243d82d6cc..e622755faef4764a8f20305004ca941ee9e84ad8 100644 (file)
@@ -1003,6 +1003,10 @@ on_quit (state_t       *state,
       return;
     }
 
+  if (state->system_initialized)
+    ply_progress_save_cache (state->progress,
+                             get_cache_file_for_mode (state->mode));
+
   state->quit_trigger = quit_trigger;
   state->should_retain_splash = retain_splash;
 
@@ -1959,9 +1963,6 @@ main (int    argc,
   exit_code = ply_event_loop_run (state.loop);
   ply_trace ("exited event loop");
 
-  ply_progress_save_cache (state.progress,
-                           get_cache_file_for_mode (state.mode));
-
   ply_boot_splash_free (state.boot_splash);
   state.boot_splash = NULL;