Refactor, re-order a bit so screen_init() doesn't run in rescue mode

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-12-30 21:20:06 +01:00
parent ab723d2f31
commit 3f7e03e813
+14 -13
View File
@@ -334,19 +334,6 @@ int main(int argc, char* argv[])
if (getpid() != 1)
return client(argc, argv);
/* Set up canvas */
screen_init();
/*
* In case of emergency.
*/
emergency_shell();
/*
* Initial setup of signals, ignore all until we're up.
*/
sig_init();
/*
* Initalize event context.
*/
@@ -374,6 +361,20 @@ int main(int argc, char* argv[])
*/
conf_parse_cmdline();
/* Set up canvas */
if (!rescue)
screen_init();
/*
* In case of emergency.
*/
emergency_shell();
/*
* Initial setup of signals, ignore all until we're up.
*/
sig_init();
/*
* Load plugins early, finit.conf may contain references to
* features implemented by plugins.