aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-07-03 05:44:18 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-07-03 05:44:18 +0000
commitd20bb177fbca7eea58def8114ac3b060fb2c910d (patch)
tree68f35075855dc08c3e4b9f2f3ce84ffcd61ea67e /init
parenta350628a729569e3427db71570d86a1e31631c27 (diff)
downloadbusybox-w32-d20bb177fbca7eea58def8114ac3b060fb2c910d.tar.gz
busybox-w32-d20bb177fbca7eea58def8114ac3b060fb2c910d.tar.bz2
busybox-w32-d20bb177fbca7eea58def8114ac3b060fb2c910d.zip
Fix from vodz so that complex init commands actually work
git-svn-id: svn://busybox.net/trunk/busybox@4995 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'init')
-rw-r--r--init/init.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/init/init.c b/init/init.c
index e4812538d..8b68a0556 100644
--- a/init/init.c
+++ b/init/init.c
@@ -579,9 +579,7 @@ static pid_t run(struct init_action *a)
579 if (strpbrk(a->command, "~`!$^&*()=|\\{}[];\"'<>?") != NULL) { 579 if (strpbrk(a->command, "~`!$^&*()=|\\{}[];\"'<>?") != NULL) {
580 cmd[0] = SHELL; 580 cmd[0] = SHELL;
581 cmd[1] = "-c"; 581 cmd[1] = "-c";
582 strcpy(buf, "exec "); 582 snprintf(buf, sizeof(buf), "exec %s", a->command);
583 safe_strncpy(buf + sizeof("exec "), a->command,
584 sizeof(buf) - sizeof("exec "));
585 cmd[2] = buf; 583 cmd[2] = buf;
586 cmd[3] = NULL; 584 cmd[3] = NULL;
587 } else { 585 } else {