summaryrefslogblamecommitdiffstats
path: root/source/a/sysvinit/sysvinit.no.console.agetty.without.sysvinit_agetty.diff
blob: c81f542bc06f15db7c6f4c19a0f29c85052a8752 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                                              
--- ./src/init.c.orig	2018-06-18 18:25:26.000000000 -0500
+++ ./src/init.c	2018-08-28 23:45:05.134948889 -0500
@@ -1337,6 +1337,13 @@
 		return;
 	}    
 	if (fgets(buf, sizeof(buf), fp)) {    
+		/* OK, this is a weird undocumented feature. We'll look for "sysvinit_agetty" in the kernel */
+		/* command line and if we don't see it, then we'll assume you didn't want this. */
+		char* t = buf;
+		if (!(t = strstr(t, "sysvinit_agetty"))) {
+			fclose(fp);
+			return;
+		}
 		char* p = buf;
 		while ((p = strstr(p, "console="))) {    
 			char* e;