diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-09-02 02:36:18 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-09-02 02:36:18 +0000 |
commit | d7cb97b8bf8945b6f04bcccbb9be72d638158321 (patch) | |
tree | d2ff4fef7b9192de63761935103699569ecbb2ee /shell | |
parent | 253ff43f62644ee79597eed14b49dcf291f198a1 (diff) | |
download | busybox-w32-d7cb97b8bf8945b6f04bcccbb9be72d638158321.tar.gz busybox-w32-d7cb97b8bf8945b6f04bcccbb9be72d638158321.tar.bz2 busybox-w32-d7cb97b8bf8945b6f04bcccbb9be72d638158321.zip |
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant.
Vodz last_patch_107
git-svn-id: svn://busybox.net/trunk/busybox@7365 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 2 | ||||
-rw-r--r-- | shell/msh.c | 7 |
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: | |||
3729 | for (ap = argv; *ap; ap++) | 3729 | for (ap = argv; *ap; ap++) |
3730 | ; | 3730 | ; |
3731 | ap = new = ckmalloc((ap - argv + 2) * sizeof(char *)); | 3731 | ap = new = ckmalloc((ap - argv + 2) * sizeof(char *)); |
3732 | *ap++ = cmd = "/bin/sh"; | 3732 | *ap++ = cmd = (char *)DEFAULT_SHELL; |
3733 | while ((*ap++ = *argv++)) | 3733 | while ((*ap++ = *argv++)) |
3734 | ; | 3734 | ; |
3735 | argv = new; | 3735 | 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 = ""; | |||
668 | static int heedint =1; | 668 | static int heedint =1; |
669 | static struct env e ={line, iostack, iostack-1, (xint *)NULL, FDBASE, (struct env *)NULL}; | 669 | static struct env e ={line, iostack, iostack-1, (xint *)NULL, FDBASE, (struct env *)NULL}; |
670 | static void (*qflag)(int) = SIG_IGN; | 670 | static void (*qflag)(int) = SIG_IGN; |
671 | static char shellname[] = "/bin/sh"; | ||
672 | static int startl; | 671 | static int startl; |
673 | static int peeksym; | 672 | static int peeksym; |
674 | static int nlseen; | 673 | static int nlseen; |
@@ -717,7 +716,7 @@ extern int msh_main(int argc, char **argv) | |||
717 | 716 | ||
718 | shell = lookup("SHELL"); | 717 | shell = lookup("SHELL"); |
719 | if (shell->value == null) | 718 | if (shell->value == null) |
720 | setval(shell, shellname); | 719 | setval(shell, DEFAULT_SHELL); |
721 | export(shell); | 720 | export(shell); |
722 | 721 | ||
723 | homedir = lookup("HOME"); | 722 | homedir = lookup("HOME"); |
@@ -2871,7 +2870,7 @@ char *c, **v, **envp; | |||
2871 | *v = e.linep; | 2870 | *v = e.linep; |
2872 | tp = *--v; | 2871 | tp = *--v; |
2873 | *v = e.linep; | 2872 | *v = e.linep; |
2874 | execve(shellname, v, envp); | 2873 | execve(DEFAULT_SHELL, v, envp); |
2875 | *v = tp; | 2874 | *v = tp; |
2876 | return("no Shell"); | 2875 | return("no Shell"); |
2877 | 2876 | ||
@@ -3902,7 +3901,7 @@ int quoted; | |||
3902 | dup2(pf[1], 1); | 3901 | dup2(pf[1], 1); |
3903 | closepipe(pf); | 3902 | closepipe(pf); |
3904 | 3903 | ||
3905 | argument_list[0] = shellname; | 3904 | argument_list[0] = (char *)DEFAULT_SHELL; |
3906 | argument_list[1] = "-c"; | 3905 | argument_list[1] = "-c"; |
3907 | argument_list[2] = child_cmd; | 3906 | argument_list[2] = child_cmd; |
3908 | argument_list[3] = 0; | 3907 | argument_list[3] = 0; |