diff options
author | Bastian Blank <waldi@debian.org> | 2022-09-02 17:10:44 +0200 |
---|---|---|
committer | Philip Hands <phil@hands.com> | 2022-09-02 17:10:44 +0200 |
commit | d672260c13e7ca452b522357fa52075f98d14d1e (patch) | |
tree | a032fcd1acde3ee362eae0d64f83f514ca288c05 | |
parent | 7c5e0a35a8af5c2b46be4fad94595facbde58fd5 (diff) |
skip non-existing devices in inittab
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.
Gbp-Pq: Name init-console.patch
-rw-r--r-- | init/init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c index efab5dcb4..3a2c0bf94 100644 --- a/init/init.c +++ b/init/init.c @@ -598,6 +598,8 @@ static void run_actions(int action_type) 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); |