From: Ray Strode Date: Tue, 5 Jun 2007 20:51:40 +0000 (-0400) Subject: once the system is fully initialized, all modules are loaded, X-Git-Tag: 0.1.0~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dae686682dd11fba6bc14aa520ea21610df4280a;p=thirdparty%2Fplymouth.git once the system is fully initialized, all modules are loaded, and the filesystem is completely mounted, etc, mount the root filesystem again from within the initrd so we can write the boot log out --- diff --git a/src/main.c b/src/main.c index e175fbf7..65f1e745 100644 --- a/src/main.c +++ b/src/main.c @@ -21,12 +21,15 @@ */ #include "config.h" +#include #include #include #include #include +#include #include #include +#include #include "ply-boot-server.h" #include "ply-event-loop.h" @@ -46,38 +49,30 @@ on_session_finished (state_t *state) { ply_log ("\nSession finished...exiting logger\n"); ply_flush_log (); - //ply_event_loop_exit (state->loop, 0); + ply_event_loop_exit (state->loop, 1); } static void on_update (state_t *state, const char *status) { - ply_log ("\nSession now at boot status '%s'\n", status); - ply_flush_log (); } static void on_system_initialized (state_t *state) { - ply_log ("\nGot told system is initialized...\n"); - ply_flush_log (); - pause (); + mknod ("/dev/root", 0600 | S_IFBLK, makedev (253, 0)); + mount("/dev/root", "/sysroot", "ext3", 0, NULL); + ply_terminal_session_open_log (state->session, + "/sysroot/var/log/bootmessages.log"); } static void on_quit (state_t *state) { - ply_log ("\nGot quit request, quitting...\n"); - ply_flush_log (); -// ply_event_loop_exit (state->loop, 0); -} - -static void -on_sigusr1 (state_t *state) -{ - ply_terminal_session_open_log (state->session, - "/var/log/bootmessages.log"); + ply_terminal_session_close_log (state->session); + umount ("/dev/root"); + ply_event_loop_exit (state->loop, 0); } static ply_boot_server_t * @@ -127,11 +122,6 @@ spawn_session (state_t *state, return NULL; } - ply_event_loop_watch_signal (state->loop, - SIGUSR1, - (ply_event_handler_t) on_sigusr1, - state); - return session; }