aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
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 521d65ab6..59aa336cd 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 a142c451a..31dd04f3e 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;