Added debian/ from 1:1.10.2-1 debian package
[busybox4maemo] / debian / patches / init-console.patch
1 --- busybox.orig/init/init.c
2 +++ busybox/init/init.c
3 @@ -505,13 +505,9 @@
4         for (a = init_action_list; a; a = tmp) {
5                 tmp = a->next;
6                 if (a->action_type & action_type) {
7 -                       // Pointless: run() will error out if open of device fails.
8 -                       ///* a->terminal of "" means "init's console" */
9 -                       //if (a->terminal[0] && access(a->terminal, R_OK | W_OK)) {
10 -                       //      //message(L_LOG | L_CONSOLE, "Device %s cannot be opened in RW mode", a->terminal /*, strerror(errno)*/);
11 -                       //      delete_init_action(a);
12 -                       //} else
13 -                       if (a->action_type & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
14 +                       if (a->terminal[0] && access(a->terminal, R_OK | W_OK)) {
15 +                               delete_init_action(a);
16 +                       } else if (a->action_type & (SYSINIT | WAIT | CTRLALTDEL | SHUTDOWN | RESTART)) {
17                                 waitfor(run(a));
18                                 delete_init_action(a);
19                         } else if (a->action_type & ONCE) {