aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-03-22 17:39:13 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-03-22 17:39:13 +0000
commitb83b6fb03b7f33216ddee4d034822f81773c7948 (patch)
treeea04a7f57dcca3ae3c5958bcb51ce5f41fc55eca /init
parent788b5f5c2fecdf5920944ac6cb21a298763d9a10 (diff)
downloadbusybox-w32-b83b6fb03b7f33216ddee4d034822f81773c7948.tar.gz
busybox-w32-b83b6fb03b7f33216ddee4d034822f81773c7948.tar.bz2
busybox-w32-b83b6fb03b7f33216ddee4d034822f81773c7948.zip
Patch from Rogelio Serrano to defer checking whether the tty exists until
we actually need to spawn something on it. git-svn-id: svn://busybox.net/trunk/busybox@14606 69ca8d6d-28ef-0310-b511-8ec308f3f277
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)
620 for (a = init_action_list; a; a = tmp) { 620 for (a = init_action_list; a; a = tmp) {
621 tmp = a->next; 621 tmp = a->next;
622 if (a->action == action) { 622 if (a->action == action) {
623 if (a->action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) { 623 if (access(a->terminal, R_OK | W_OK)) {
624 delete_init_action(a);
625 } else if (a->action & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
624 waitfor(a); 626 waitfor(a);
625 delete_init_action(a); 627 delete_init_action(a);
626 } else if (a->action & ONCE) { 628 } else if (a->action & ONCE) {
@@ -815,9 +817,6 @@ static void new_init_action(int action, const char *command, const char *cons)
815 if (*cons == '\0') 817 if (*cons == '\0')
816 cons = console; 818 cons = console;
817 819
818 /* do not run entries if console device is not available */
819 if (access(cons, R_OK | W_OK))
820 return;
821 if (strcmp(cons, bb_dev_null) == 0 && (action & ASKFIRST)) 820 if (strcmp(cons, bb_dev_null) == 0 && (action & ASKFIRST))
822 return; 821 return;
823 822