patch to allow init to use devices created by udev

Rogelio Serrano rogelio.serrano at gmail.com
Wed Mar 22 12:32:00 UTC 2006


this is to allow init to use devices created by udev after coldplugging

--
www.smsglobal.net SMS Global Ltd Short Message Service For Seafarers
-------------- next part --------------
--- busybox/init/init.c	Wed Mar 22 20:15:40 2006
+++ busybox-rms/init/init.c	Wed Mar 22 20:26:58 2006
@@ -620,7 +620,9 @@
 	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 @@
 	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;
 


More information about the busybox mailing list