File: init-console.patch

package info (click to toggle)
busybox 1%3A1.37.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,720 kB
  • sloc: ansic: 190,172; sh: 10,433; cpp: 1,428; makefile: 1,006; asm: 798; yacc: 570; lex: 355; perl: 334; python: 112; awk: 29
file content (20 lines) | stat: -rw-r--r-- 633 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: skip non-existing devices in inittab
From: Bastian Blank <waldi@debian.org>
Bug-Debian: https://bugs.debian.org/541115
Forwarded: no

This patch causes init silently skip running processes from inittab if
the terminal name is specified but the corresponding device file does not
exist.

--- a/init/init.c
+++ b/init/init.c
@@ -598,6 +598,8 @@
 	for (a = G.init_action_list; a; a = a->next) {
 		if (!(a->action_type & action_type))
 			continue;
+		if (a->terminal[0] && access(a->terminal, R_OK | W_OK))
+			continue;
 
 		if (a->action_type & (SYSINIT | WAIT | ONCE | CTRLALTDEL | SHUTDOWN)) {
 			pid_t pid = run(a);