summaryrefslogtreecommitdiffhomepage
path: root/init
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-03-22 17:39:13 +0000
committerRob Landley <rob@landley.net>2006-03-22 17:39:13 +0000
commit2dd42799594c6197ca97ca3ec65ec73c81af0875 (patch)
treeea04a7f57dcca3ae3c5958bcb51ce5f41fc55eca /init
parent2324a7c9e5809441cbba5ea3e84bcea65578b725 (diff)
Patch from Rogelio Serrano to defer checking whether the tty exists until
we actually need to spawn something on it.
Diffstat (limited to 'init')
-rw-r--r--init/init.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/init/init.c b/init/init.c
index 2ddcef936..704cfccda 100644
--- a/init/init.c
+++ b/init/init.c
@@ -620,7 +620,9 @@ static void run_actions(int action)
for (a = init_action_list; a; a = tmp) {
tmp = a->next;
if (a->action == action) {
- if (a->action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
+ if (access(a->terminal, R_OK | W_OK)) {
+ delete_init_action(a);
+ } else if (a->action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
waitfor(a);
delete_init_action(a);
} else if (a->action & ONCE) {
@@ -815,9 +817,6 @@ static void new_init_action(int action, const char *command, const char *cons)
if (*cons == '\0')
cons = console;
- /* do not run entries if console device is not available */
- if (access(cons, R_OK | W_OK))
- return;
if (strcmp(cons, bb_dev_null) == 0 && (action & ASKFIRST))
return;