state->text_displays = ply_list_new ();
state->keyboard = NULL;
- if (state->mode == PLY_MODE_SHUTDOWN)
+ if (!state->default_tty)
{
- state->default_tty = "tty63";
+ if (state->mode == PLY_MODE_SHUTDOWN)
+ {
+ state->default_tty = "tty63";
+ }
+ else
+ state->default_tty = "tty1";
}
- else
- state->default_tty = "tty1";
check_for_consoles (state, state->default_tty, false);
bool attach_to_session;
ply_daemon_handle_t *daemon_handle;
char *mode_string = NULL;
+ char *tty = NULL;
state.command_parser = ply_command_parser_new ("plymouthd", "Boot splash control server");
"debug-file", "File to output debugging information to", PLY_COMMAND_OPTION_TYPE_STRING,
"mode", "Mode is one of: boot, shutdown", PLY_COMMAND_OPTION_TYPE_STRING,
"pid-file", "Write the pid of the daemon to a file", PLY_COMMAND_OPTION_TYPE_STRING,
+ "tty", "TTY to use instead of default", PLY_COMMAND_OPTION_TYPE_STRING,
NULL);
if (!ply_command_parser_parse_arguments (state.command_parser, state.loop, argv, argc))
"debug", &debug,
"debug-file", &debug_buffer_path,
"pid-file", &pid_file,
+ "tty", &tty,
NULL);
if (should_help)
free (mode_string);
}
+ if (tty != NULL)
+ {
+ state.default_tty = tty;
+ }
+
if (geteuid () != 0)
{
ply_error ("plymouthd must be run as root user");