mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 00:24:17 +07:00
Compat kernel command line debug option --verbose
Check for "--verbose", as well as "finit_debug", on kernel command line to enable debugging of finit. The former is a compatibility option with upstart, see http://upstart.ubuntu.com/wiki/Debugging Add the following to the kernel command line to enable: "init=/sbin/finit --verbose" Without the quote characters. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -87,14 +87,18 @@ int main(void)
|
||||
*/
|
||||
if ((f = fopen("/proc/cmdline", "r")) != NULL) {
|
||||
fgets(line, LINE_SIZE, f);
|
||||
if ((strstr(line, "finit_debug"))) {
|
||||
|
||||
if (strstr(line, "finit_debug") ||
|
||||
strstr(line, "--verbose")) {
|
||||
debug = 1;
|
||||
}
|
||||
|
||||
if (strstr(line, "quiet")) {
|
||||
close(0);
|
||||
close(1);
|
||||
close(2);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user