Support reading --debug et al from process command line

Up until now Finit has only read /proc/cmdline to determine debug level,
single user mode, etc.  This patch is one in a series to make enable it
to run also in containers.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2020-07-01 13:08:41 +02:00
parent df54f5a59c
commit fdead062cd
3 changed files with 28 additions and 21 deletions
+6 -6
View File
@@ -292,6 +292,12 @@ int main(int argc, char *argv[])
if (getpid() != 1)
return client(argc, argv);
/*
* Parse kernel command line (debug, rescue, splash, etc.)
* Also calls log_init() to set correct log level
*/
conf_parse_cmdline(argc, argv);
/*
* Hide command line arguments from ps (in particular for
* forked children that don't execv()). This is an ugly
@@ -320,12 +326,6 @@ int main(int argc, char *argv[])
chdir("/");
umask(0);
/*
* Parse kernel command line (debug, rescue, splash, etc.)
* Also calls log_init() to set correct log level
*/
conf_parse_cmdline();
/* Set up canvas */
if (!rescue && !log_is_debug())
screen_init();