Commit Graph

140 Commits

Author SHA1 Message Date
Matt Kraai
c8227639db Change strdup calls to xstrdup (patch from Steve Merrifield). 2001-11-12 16:57:27 +00:00
Eric Andersen
72f9a4277f Add in some (theoretical) uClinux support. Some init cleanups 2001-10-28 05:12:20 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
d63dee4019 Add an option to make the shells not advertise their busybox nature 2001-10-19 00:22:23 +00:00
Eric Andersen
f0a4ac8216 Patch from Magnus Damm <damm@opensource.se> to avoid lash hanging
on serial ports
2001-10-03 11:23:42 +00:00
Eric Andersen
5d60a46269 Fix a warning and potential segfault in lash when BB_FEATURE_CLEAN_UP
is enabled
2001-08-22 05:32:24 +00:00
Matt Kraai
2d91deba45 Allow multiple shells to be enabled. 2001-08-01 17:21:35 +00:00
Eric Andersen
7467c8d3b6 Patch from vodz:
Changed email address
    cmdedit API change
    optimizations for traceroute and md5sum
    added a new shared create_icmp_socket() function
2001-07-12 20:26:32 +00:00
Eric Andersen
07abfe2092 don't whine if all we need to do is remove a bg job 2001-06-27 17:29:11 +00:00
Eric Andersen
4b6b5e4314 Re-enable globbing (I'd accidentaly removed it) and finish off the last
of the job control polishing.  Works fine now.
 -Erik
2001-06-27 04:30:11 +00:00
Eric Andersen
2d848a476a This should finish off the job control issues with lash. Make certain
we have a controlling terminal...
 -Erik
2001-06-25 17:11:54 +00:00
Eric Andersen
8a646dd293 This commit guts lash, restoring it to what it was originally intended to do,
just be a simple command line interpreter with basic pipe, redirect, and job
control.  For all the more fancy things, people should use hush or ash.
 -Erik
2001-06-21 16:38:11 +00:00
Eric Andersen
77d9268892 Patch from larry to fix some grammar errors. 2001-05-23 20:32:09 +00:00
Eric Andersen
004015e9c4 Patch from Lars Kellogg-Stedman <lars@larsshack.org> to fix bug
#1130 (i.e. When you turn on features it should always ADD features)
2001-05-21 20:30:51 +00:00
Matt Kraai
59df6f7398 Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.c
by Larry Doolittle.
2001-05-16 14:21:09 +00:00
Eric Andersen
cfa88ecb72 Fix up some silly warnings 2001-05-11 18:08:16 +00:00
Eric Andersen
5f265b755a Fix a segfault in lash, hush, and cmdedit. Each of these used
xgetcwd, but did not check the return for a NULL, and then continued
to call strlen on the NULL when the cwd had been removed from under it.
 -Erik
2001-05-11 16:58:46 +00:00
Mark Whitley
4b541a8817 Moved some #ifdefs down below #include "busybox.h" where they belong. 2001-04-25 17:10:30 +00:00
Eric Andersen
ed424dbf1d Some patches from Gennady Feldman. Fixed a glob problem such that
'ls *.h Config.h' works.  Fixed a silly typo with fg/bg process control.
Made cmdedit exit sanely when it cannot read input.
2001-04-23 15:28:28 +00:00
Matt Kraai
4ef40c02f4 Another banner consolidation from Larry Doolittle <ldoolitt@recycle.lbl.gov>. 2001-04-12 20:44:21 +00:00
Matt Kraai
be66ad3212 Fix handling of '' and "". 2001-04-12 15:42:17 +00:00
Eric Andersen
e5dfced23a Apply Vladimir's latest cleanup patch.
-Erik
2001-04-09 22:48:12 +00:00
Matt Kraai
2129f97cd9 Avoid segfault when export is invoked with no arguments. Thanks to
Gennady Feldman.
2001-04-04 17:50:04 +00:00
Eric Andersen
84e229cfbe Add in a new standalone env applet for fixing up app's environments
-Erik
2001-03-29 22:48:33 +00:00
Mark Whitley
a82a00397f Fix to last patch: locale code should be 9, not 7. 2001-03-27 17:07:15 +00:00
Mark Whitley
1c6581a865 Applied patch from Vladimir N. Oleynik to add locale support to the shell per
bug report from Ralph Jones.
2001-03-27 16:35:16 +00:00
Eric Andersen
82ab8da245 -Wshadow sh fix from Jeff Garzik 2001-03-23 17:06:01 +00:00
Eric Andersen
1ca20a7747 A nice patch from Larry Doolittle that adds -Wshadow and
cleans up most of the now-revealed problems.
2001-03-21 07:34:27 +00:00
Eric Andersen
341744781a Patch from Larry and Vladimir to clean up sh.c and fix
shell expansion to work in non POSIX locales.
2001-03-17 00:20:10 +00:00
Eric Andersen
4aaefc2a50 Fix from Larry for glob problems.
-Erik
2001-03-15 23:01:19 +00:00
Mark Whitley
730cdb1904 Reversed previous patch. The right way is to fix uClibc. 2001-03-15 19:39:40 +00:00
Mark Whitley
0b57e28373 Applied patch from Andreas Neuhaus to fix namespace conflict that made busybox
not compile with uClibc.
2001-03-15 19:12:06 +00:00
Eric Andersen
1ef92685cf Yesterday I make strsep_space include post-token whitespace,
so we should not be adding another " " between tokens.
 -Erik
2001-03-14 19:33:45 +00:00
Eric Andersen
ce4a586edb I forgot to malloc space for the NULL.
-Erik
2001-03-14 18:57:54 +00:00
Mark Whitley
44a9914709 Applied patch from Larry Doolittle to fix '>\na\n' bug. Should close bug #1132 2001-03-14 17:26:37 +00:00
Eric Andersen
4e7244e6b2 libc5 glob is pretty stupid and doesn't do GLOB_BRACE or GLOB_TILDE
-Erik
2001-03-14 00:49:52 +00:00
Mark Whitley
f594986b37 - Changed name of BB_FEATURE_SIMPLE_PROMPT to BB_FEATURE_SH_SIMPLE_PROMPT
- Set BB_FEATURE_SH_STANDALONE_SHELL and BB_FEATURE_SH_APPLETS_ALWAYS_WIN to
   be off by default
 - Set BB_FEATURE_SH_SIMPLE_PROMPT to be on by default
 - Added some more magic to the Olympus section to make all the dependencies
   on the shell, cmdline editing, tab completion and friend work properly.
 - Tidied up the Olympus section with some whitespace. Checked the various
   scrips that parse through there and the extra whitespace shouldn't break
   anything.
2001-03-14 00:29:14 +00:00
Eric Andersen
b3d6e2df95 Update the lash shell (hopefully the last time...) so things like
echo "foo   bar" and echo -n "foo\t\\\\\tbar" work as expected.
Merge prompt printing work from Vladimir.
 -Erik
2001-03-13 22:57:56 +00:00
Eric Andersen
4987bbf979 A fix from Larry Doolittle for some nasty segfaults when sh.c tried to free a
corrupted cmd pointer, and where it would truncate a command line at the first
double space.
 -Erik
2001-03-12 21:36:49 +00:00
Eric Andersen
1365bb7861 When using wordexp, only try to use the expand command
when something actually got expanded.  Skip it otherwise.
 -Erik
2001-03-10 07:12:12 +00:00
Eric Andersen
74e056bfc8 Fixed a couple more cases. $FOO/bar ${FOO} and such now work
without wordexp.  Of course for stuff like ${1:-foo} you still
need wordexp for them to work.
 -Erik
2001-03-09 20:34:46 +00:00
Eric Andersen
3c7361f53a Allow wordexp to be used if available 2001-03-09 19:45:26 +00:00
Eric Andersen
ce89871ff7 Urg. Remove the debug noise 2001-03-09 19:43:57 +00:00
Eric Andersen
195743f195 Ok, sh.c should be working now. Many thanks to Larry Doolittle
for his timely help -- nearly all of the work in this patch is
his.
 -Erik
2001-03-09 19:21:37 +00:00
Eric Andersen
01658a3eec Fix sh.c for the glab case. I was messing things up for
single argument commands.  It should now work as expected...
 -Erik
2001-03-09 01:24:02 +00:00
Eric Andersen
3dbf1e877a A '.' is a legal seperator. 2001-03-09 01:08:06 +00:00
Eric Andersen
b180dd9e50 Cleanup patch from Larry 2001-03-09 00:42:46 +00:00
Eric Andersen
13d1fa1d01 Add in 'trim' routine. Fix up sh.c so it works when wordexp
is not available.
 -Erik
2001-03-08 23:59:45 +00:00
Eric Andersen
32f8c170b0 Remember to delete un-expandable variables, and do a better job of expanding
shell-specific things in case the wordexp implementation is broken (ie. the
stubbed out wordexp in uClibc).
 -Erik
2001-03-08 17:44:37 +00:00
Eric Andersen
ca6045955d Rework environment variable handling to use wordexp, per a suggestion from
Larry Doolittle a couple of months ago.  This makes the stuff-expansion in lash
be ever so standards compliant.   This change needs testing by everyone, but
appears to be solid enough to let us close bug #1090.

It works for me; however, please test this change!
 -Erik
2001-03-08 17:17:13 +00:00