diff options
-rw-r--r-- | init.c | 8 | ||||
-rw-r--r-- | init/init.c | 8 |
2 files changed, 10 insertions, 6 deletions
@@ -62,7 +62,9 @@ | |||
62 | #define SERIAL_CON1 "/dev/ttyS1" /* Serial console */ | 62 | #define SERIAL_CON1 "/dev/ttyS1" /* Serial console */ |
63 | #define GETTY "/sbin/getty" /* Default location of getty */ | 63 | #define GETTY "/sbin/getty" /* Default location of getty */ |
64 | #define SHELL "/bin/sh" /* Default shell */ | 64 | #define SHELL "/bin/sh" /* Default shell */ |
65 | #define INITSCRIPT "/etc/init.d/rcS" /* Initscript. */ | 65 | #ifndef BB_INIT_SCRIPT |
66 | #define BB_INIT_SCRIPT "/etc/init.d/rcS" /* Initscript. */ | ||
67 | #endif | ||
66 | 68 | ||
67 | #define LOG 0x1 | 69 | #define LOG 0x1 |
68 | #define CONSOLE 0x2 | 70 | #define CONSOLE 0x2 |
@@ -455,7 +457,7 @@ extern int init_main(int argc, char **argv) | |||
455 | struct stat statbuf; | 457 | struct stat statbuf; |
456 | char which_vt1[30]; | 458 | char which_vt1[30]; |
457 | char which_vt2[30]; | 459 | char which_vt2[30]; |
458 | const char* const rc_script_command[] = { INITSCRIPT, INITSCRIPT, 0}; | 460 | const char* const rc_script_command[] = { BB_INIT_SCRIPT, BB_INIT_SCRIPT, 0}; |
459 | const char* const getty1_command[] = { GETTY, GETTY, "38400", which_vt1, 0}; | 461 | const char* const getty1_command[] = { GETTY, GETTY, "38400", which_vt1, 0}; |
460 | const char* const getty2_command[] = { GETTY, GETTY, "38400", which_vt2, 0}; | 462 | const char* const getty2_command[] = { GETTY, GETTY, "38400", which_vt2, 0}; |
461 | const char* const shell_command[] = { SHELL, "-" SHELL, 0}; | 463 | const char* const shell_command[] = { SHELL, "-" SHELL, 0}; |
@@ -537,7 +539,7 @@ extern int init_main(int argc, char **argv) | |||
537 | } | 539 | } |
538 | 540 | ||
539 | /* Make sure an init script exists before trying to run it */ | 541 | /* Make sure an init script exists before trying to run it */ |
540 | if (single==FALSE && stat(INITSCRIPT, &statbuf)==0) { | 542 | if (single==FALSE && stat(BB_INIT_SCRIPT, &statbuf)==0) { |
541 | run_rc = TRUE; | 543 | run_rc = TRUE; |
542 | wait_for_enter_tty1 = FALSE; | 544 | wait_for_enter_tty1 = FALSE; |
543 | tty1_command = rc_script_command; | 545 | tty1_command = rc_script_command; |
diff --git a/init/init.c b/init/init.c index ba65f51fd..561b5fd52 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -62,7 +62,9 @@ | |||
62 | #define SERIAL_CON1 "/dev/ttyS1" /* Serial console */ | 62 | #define SERIAL_CON1 "/dev/ttyS1" /* Serial console */ |
63 | #define GETTY "/sbin/getty" /* Default location of getty */ | 63 | #define GETTY "/sbin/getty" /* Default location of getty */ |
64 | #define SHELL "/bin/sh" /* Default shell */ | 64 | #define SHELL "/bin/sh" /* Default shell */ |
65 | #define INITSCRIPT "/etc/init.d/rcS" /* Initscript. */ | 65 | #ifndef BB_INIT_SCRIPT |
66 | #define BB_INIT_SCRIPT "/etc/init.d/rcS" /* Initscript. */ | ||
67 | #endif | ||
66 | 68 | ||
67 | #define LOG 0x1 | 69 | #define LOG 0x1 |
68 | #define CONSOLE 0x2 | 70 | #define CONSOLE 0x2 |
@@ -455,7 +457,7 @@ extern int init_main(int argc, char **argv) | |||
455 | struct stat statbuf; | 457 | struct stat statbuf; |
456 | char which_vt1[30]; | 458 | char which_vt1[30]; |
457 | char which_vt2[30]; | 459 | char which_vt2[30]; |
458 | const char* const rc_script_command[] = { INITSCRIPT, INITSCRIPT, 0}; | 460 | const char* const rc_script_command[] = { BB_INIT_SCRIPT, BB_INIT_SCRIPT, 0}; |
459 | const char* const getty1_command[] = { GETTY, GETTY, "38400", which_vt1, 0}; | 461 | const char* const getty1_command[] = { GETTY, GETTY, "38400", which_vt1, 0}; |
460 | const char* const getty2_command[] = { GETTY, GETTY, "38400", which_vt2, 0}; | 462 | const char* const getty2_command[] = { GETTY, GETTY, "38400", which_vt2, 0}; |
461 | const char* const shell_command[] = { SHELL, "-" SHELL, 0}; | 463 | const char* const shell_command[] = { SHELL, "-" SHELL, 0}; |
@@ -537,7 +539,7 @@ extern int init_main(int argc, char **argv) | |||
537 | } | 539 | } |
538 | 540 | ||
539 | /* Make sure an init script exists before trying to run it */ | 541 | /* Make sure an init script exists before trying to run it */ |
540 | if (single==FALSE && stat(INITSCRIPT, &statbuf)==0) { | 542 | if (single==FALSE && stat(BB_INIT_SCRIPT, &statbuf)==0) { |
541 | run_rc = TRUE; | 543 | run_rc = TRUE; |
542 | wait_for_enter_tty1 = FALSE; | 544 | wait_for_enter_tty1 = FALSE; |
543 | tty1_command = rc_script_command; | 545 | tty1_command = rc_script_command; |