mirror of
https://github.com/troglobit/finit.git
synced 2026-10-23 11:44:37 +00: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:
1 parent
5da4f4cfc3
commit
2f527215d0
1 file changed
+5
-1
@@ -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