diff options
| author | Ray Strode <rstrode@redhat.com> | 2007-06-05 16:51:40 -0400 |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2007-06-05 16:51:40 -0400 |
| commit | dae686682dd11fba6bc14aa520ea21610df4280a (patch) | |
| tree | ce0611f7ebd5668902df927b8bf92bf5df7b0514 /src | |
| parent | 150194ce408ce5e4fa706d08bb14bc08b40ff105 (diff) | |
| download | plymouth-dae686682dd11fba6bc14aa520ea21610df4280a.tar.gz plymouth-dae686682dd11fba6bc14aa520ea21610df4280a.tar.xz plymouth-dae686682dd11fba6bc14aa520ea21610df4280a.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 32 |
1 files changed, 11 insertions, 21 deletions
@@ -21,12 +21,15 @@ */ #include "config.h" +#include <dirent.h> #include <fcntl.h> #include <stdlib.h> #include <stdio.h> #include <sys/stat.h> +#include <sys/mount.h> #include <sys/types.h> #include <sysexits.h> +#include <unistd.h> #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; } |
