aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>1999-12-21 02:54:37 +0000
committerErik Andersen <andersen@codepoet.org>1999-12-21 02:54:37 +0000
commitf294a0288d5f90616c5a096c2236442394112daa (patch)
tree2cbac40fef551950f2ec75ea00ab4a3f5e079d22
parent021043205c55677a31929594977342e96d459a6c (diff)
downloadbusybox-w32-f294a0288d5f90616c5a096c2236442394112daa.tar.gz
busybox-w32-f294a0288d5f90616c5a096c2236442394112daa.tar.bz2
busybox-w32-f294a0288d5f90616c5a096c2236442394112daa.zip
Fix double quoting bug preventing ininit scripts from running
-rw-r--r--init.c8
-rw-r--r--init/init.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/init.c b/init.c
index ba65f51fd..561b5fd52 100644
--- a/init.c
+++ b/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;
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;