Delay start of TTYs to let system stabilize at boot.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2013-06-06 18:19:27 +02:00
1 parent 4f2cf52eff
commit bf40278131
2 files changed
+13 -3

No files matched your search

+10 -3
View File
@@ -133,10 +133,20 @@ static int client(int argc, char *argv[])
static int run_loop(void) static int run_loop(void)
{ {
int delay = DELAY_TTY ?: 1;
_d("Entering main loop ..."); _d("Entering main loop ...");
while (1) { while (1) {
svc_monitor(); svc_monitor();
plugin_monitor(); plugin_monitor();
/* Delayed start of TTYs to let the system stabilize
* after switching runlevels. */
if (delay) {
if (--delay == 0)
tty_runlevel(runlevel);
continue;
}
} }
return 0; return 0;
@@ -269,9 +279,6 @@ int main(int argc, char* argv[])
/* Hooks that should run at the very end */ /* Hooks that should run at the very end */
plugin_run_hooks(HOOK_SYSTEM_UP); plugin_run_hooks(HOOK_SYSTEM_UP);
/* Start GETTY on console(s) */
tty_runlevel(runlevel);
/* /*
* Enter main loop to monior /dev/initctl and services * Enter main loop to monior /dev/initctl and services
*/ */
+3
View File
@@ -60,6 +60,9 @@
# define DEFHOST "noname" # define DEFHOST "noname"
#endif #endif
/* Delay start of GETTY at boot. Must be > 0 */
#define DELAY_TTY 2
#define CMD_SIZE 256 #define CMD_SIZE 256
#define LINE_SIZE 1024 #define LINE_SIZE 1024
#define BUF_SIZE 4096 #define BUF_SIZE 4096