summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorGlenn L McGrath2003-09-02 02:36:18 +0000
committerGlenn L McGrath2003-09-02 02:36:18 +0000
commitdc4e75ef7ca135c836d22e380847672cf5b3773b (patch)
treed2ff4fef7b9192de63761935103699569ecbb2ee /shell
parent005f83adf511ab89296639abbef737ad4e5826f9 (diff)
downloadbusybox-dc4e75ef7ca135c836d22e380847672cf5b3773b.zip
busybox-dc4e75ef7ca135c836d22e380847672cf5b3773b.tar.gz
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant. Vodz last_patch_107
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c2
-rw-r--r--shell/msh.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 521d65a..59aa336 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3729,7 +3729,7 @@ repeat:
for (ap = argv; *ap; ap++)
;
ap = new = ckmalloc((ap - argv + 2) * sizeof(char *));
- *ap++ = cmd = "/bin/sh";
+ *ap++ = cmd = (char *)DEFAULT_SHELL;
while ((*ap++ = *argv++))
;
argv = new;
diff --git a/shell/msh.c b/shell/msh.c
index a142c45..31dd04f 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -668,7 +668,6 @@ static char *null = "";
static int heedint =1;
static struct env e ={line, iostack, iostack-1, (xint *)NULL, FDBASE, (struct env *)NULL};
static void (*qflag)(int) = SIG_IGN;
-static char shellname[] = "/bin/sh";
static int startl;
static int peeksym;
static int nlseen;
@@ -717,7 +716,7 @@ extern int msh_main(int argc, char **argv)
shell = lookup("SHELL");
if (shell->value == null)
- setval(shell, shellname);
+ setval(shell, DEFAULT_SHELL);
export(shell);
homedir = lookup("HOME");
@@ -2871,7 +2870,7 @@ char *c, **v, **envp;
*v = e.linep;
tp = *--v;
*v = e.linep;
- execve(shellname, v, envp);
+ execve(DEFAULT_SHELL, v, envp);
*v = tp;
return("no Shell");
@@ -3902,7 +3901,7 @@ int quoted;
dup2(pf[1], 1);
closepipe(pf);
- argument_list[0] = shellname;
+ argument_list[0] = (char *)DEFAULT_SHELL;
argument_list[1] = "-c";
argument_list[2] = child_cmd;
argument_list[3] = 0;