Glenn L McGrath
47e5ca1ecb
Patch by Jean Wolter to fix a bug where a script wouldnt be executed
...
unless it had #!/bin/sh in the first line
"It correctly locates the script, tries to execute it via execve which
fails. After that it tries to hand it over to /bin/sh which fails too,
since ash
- neither provides the absolute pathname to /bin/sh
- nor tries to lookup the script via PATH if called as "sh script"
"
2003-09-15 12:00:19 +00:00
Eric Andersen
8efe967018
Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
...
to ensure proper fallback behavior on, i.e. serial consoles.
-Erik
2003-09-15 08:33:45 +00:00
Eric Andersen
f57a614db9
config option CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN must depend
...
on CONFIG_FEATURE_SH_STANDALONE_SHELL.
2003-09-12 04:49:21 +00:00
Glenn L McGrath
dc4e75ef7c
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
...
constant.
Vodz last_patch_107
2003-09-02 02:36:18 +00:00
Glenn L McGrath
005f83adf5
Fix compile error and reducing size for libbb/get_console.c to previous size.
...
Vodz last_patch106
2003-09-01 08:53:32 +00:00
Glenn L McGrath
7b8765c808
vodz, last patch 103
2003-08-29 07:29:30 +00:00
Manuel Novoa III
4456f25e8f
Rewrite timescmd() function to avoid the use of floating point and to
...
correct a bug in the seconds display where something like 65 seconds
would be output as "1m65.000000s".
2003-08-13 17:48:47 +00:00
Eric Andersen
b287e2e27a
Use the new 'select' option to make the shell config
...
much less evil and far more obvious.
-Erik
2003-08-08 23:40:12 +00:00
Eric Andersen
9089844382
Latest dash update from vodz
2003-08-06 11:20:52 +00:00
Eric Andersen
72d8e444f0
Merge/rework config system per the latest from linux-2.6.0-test2.
...
Fix the config bugs revealed by the updated config system.
-Erik
2003-08-05 02:18:25 +00:00
Eric Andersen
ca16204c31
Fixup typo noticed by Nick Fedchik
2003-07-29 07:15:17 +00:00
Eric Andersen
81fe123040
Vladimir N. Oleynik writes:
...
Last patch have synced form Manuel Nova III xxreadtoken() function,
corrected (C) form dash debian/copyright, removed my small mistake
with IFS_BROKEN (thanks by Herbert), and synced cmdedit.c from
current CVS (removed libc5 support, your email correction, my (C) year
corertion).
2003-07-29 06:38:40 +00:00
Eric Andersen
c470f4477a
This is synced from dash-0.4.17 and full ready for insert to new busybox
...
version:
ftp://ftp.simtreas.ru/pub/my/bb/new
News:
- code is smalest!
- support ${var...} expr
- used new very strongly steal controlling terminal
2003-07-28 09:56:35 +00:00
Eric Andersen
3857a184c7
Document CONFIG_ASH_CMDCMD
2003-07-22 10:14:32 +00:00
Eric Andersen
9c3c38da55
Patch from Terje Kvernes adding quite a lot of missing documentation
2003-07-22 09:59:34 +00:00
Eric Andersen
85e5e72bc1
Remove remaining libc5 support code
2003-07-22 08:56:55 +00:00
Eric Andersen
cb81e6484d
Update a bunch of docs. Run a script to update my email addr.
2003-07-14 21:21:08 +00:00
Eric Andersen
e5642119ee
Patch from Thomas Cameron:
...
Hello all,
This patch adds more "Help" text to the config system. Almost
all applets now have a help entry. Also, I cleaned up the spacing of
the existing text so that things are consistent. This patch is against
this morning's CVS.
Thomas Cameron
CEI Systems, Inc.
2003-07-14 19:37:08 +00:00
Eric Andersen
e5920a2dc0
Patch from Kent Robotti adding a bunch of menuconfig help
2003-07-03 10:00:15 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Eric Andersen
737f5fb890
Patch from Jonas Holmberg, adjusted by Robert Schwebel, and
...
later re-adjusted by me to fix msh backtick handling
2003-03-14 16:05:59 +00:00
Eric Andersen
4b525addb8
Only call free if it is necessary
2003-01-14 06:40:11 +00:00
Glenn L McGrath
7040ecc993
Minor cleanup, identified by Stewart Brodie, patch by Vladimir N.
...
Oleynik
2003-01-06 16:27:07 +00:00
Glenn L McGrath
4d00129d0f
Correct column width for tab completion and ls
2003-01-06 01:11:50 +00:00
Eric Andersen
2c24bb80f9
Fix tab-tab listing of files so it properly reflects current
...
terminal width.
-Erik
2003-01-02 07:25:47 +00:00
Glenn L McGrath
c00c56e7c8
Fix STANDALONE_SHELL and ALWAYS_WIN options, last_path_73 by Vladimir N. Oleynik
2002-12-23 10:23:10 +00:00
Glenn L McGrath
4501dbe509
Small bugfix, last_patch72 from Vladimir N. Oleynik
2002-12-11 21:13:00 +00:00
Eric Andersen
392947c860
Fixup all the horrible broken function prototypes
...
-Erik
2002-12-11 07:42:46 +00:00
Eric Andersen
ece8fc2b9b
Squash a warning by making function declaration a proper prototype
2002-12-11 04:26:28 +00:00
Glenn L McGrath
fdbbb04893
Command line history changes, lastpatch_71 from Vladimir N. Oleynik
2002-12-09 11:10:40 +00:00
Eric Andersen
a6b9051e16
Allow for people to select no default shell
2002-12-06 21:49:59 +00:00
Eric Andersen
da15a496e2
Make hush comple once again
2002-12-06 21:37:08 +00:00
Eric Andersen
c9f20d9fb9
Yet another major rework of the BusyBox config system, using the considerably
...
modified Kbuild system I put into uClibc. With this, there should be no more
need to modify Rules.mak since I've moved all the interesting options into the
config system. I think I've got everything updated, but you never know, I may
have made some mistakes, so watch closely.
-Erik
2002-12-05 08:41:41 +00:00
Robert Griebl
350d26bbbb
- the number of commands in the history list is now configureable via the
...
config system
- added a new config option to allow persistant history lists. This is
currently only used by ash, but the calls ({load,save}_history) could
be added to the other shells as well.
2002-12-03 22:45:46 +00:00
Aaron Lehmann
a170e1c858
Change if(x)free(x); to free(x);
2002-11-28 11:27:31 +00:00
Glenn L McGrath
062c74f710
last_patch_68 from Vladimir N. Oleynik
2002-11-27 09:29:49 +00:00
Eric Andersen
7ab93d9980
Teach lash to get $1 $2 $3 etc correct
...
-Erik
2002-11-08 09:40:02 +00:00
Eric Andersen
09da627a23
Fix warning
2002-10-22 22:15:33 +00:00
Eric Andersen
1887b0478f
Apply last_patch51_3 from vodz
2002-10-22 11:58:59 +00:00
Eric Andersen
ad082987d0
Use %m, not strerror, and strerror(err) was broken anyways and should have been
...
strerror(errno). Problem noted by Alexey V. Neyman <alex.neyman@auriga.ru>
2002-09-30 20:20:20 +00:00
Eric Andersen
aa1d6ccbfb
Don't even try to run ash on uClinux. It won't work.
...
-Erik
2002-09-30 20:12:32 +00:00
Eric Andersen
6f2ebcaa01
Avoid calling exit() from within fork/vfork'ed processes.
...
-Erik
2002-09-26 13:59:40 +00:00
Eric Andersen
bf8bf105fb
Patch from "Joe.C" <joe@numa.com.tw>
2002-09-17 08:41:08 +00:00
Eric Andersen
2bec97c076
Some CML1 grammar fixes
...
-Erik
2002-09-01 06:45:55 +00:00
Glenn L McGrath
50812fff21
Apply vodz last_path_51-2
2002-08-23 13:14:48 +00:00
Glenn L McGrath
9fef17dec3
Run through indent, fix comments
2002-08-22 18:41:20 +00:00
Aaron Lehmann
49c024addd
Remove ckfree, and replace all references with free. Remove freefunc,
...
which is also equivilent to free. Remove some if(x)free(x)
redundancies.
2002-08-02 06:39:47 +00:00
Eric Andersen
7373e485d3
A couple of small bugfixes from Marshall M. Midden <m4@brecis.com>
2002-07-31 04:04:47 +00:00
Robert Griebl
b230159958
Fixed a timing bug which occured when bb ash is run in a rxvt on the
...
HP iPAQ. Sometimes we get a SIGWINCH and want to print the prompt, although
the prompt is not yet initialised (0) .. so just don't print a prompt
as long as the prompt string is 0
2002-07-30 23:13:51 +00:00
Robert Griebl
d378c3149c
Applied vodz' patches #49 and #50 (with a small correction in runshell.c)
...
#49 : I found one memory overflow and memory leak in "ln" applet.
Last patch reduced also 54 bytes. ;)
#50 : I found bug in loginutils/Makefile.in.
New patch have also new function to libbb and
aplied this to applets and other cosmetic changes.
2002-07-19 00:05:54 +00:00
Eric Andersen
2276d83639
Fixup warnings and undefined operations that show up in gcc-3.1
...
-Erik
2002-07-11 11:11:56 +00:00
Eric Andersen
8e139871fe
Patch from Stewart Brodie <stewart.brodie@pace.co.uk> to fix ash:
...
When alias support is not configured, ash believes that command parameters
that look like dd's "if=/dev/zero" are requests to set a temporary
environment variable whilst dd is running, even though it appears after the
command name. This is caused by the re-use of the checkalias global variable
to indicate when both alias checking and environment variable checking. The
failure to reset this flag is due to the reset action being performed only
inside the feature check CHECK_ASH_ALIAS. Hence ash works as expected when
aliases are configured in, and fails when not.
Example script using 'date' with different settings of TZ:
# TZ=Europe/London
# export TZ
# date
Thu May 30 17:18:49 BST 2002
# TZ=America/New_York date
Thu May 30 12:19:10 EDT 2002
# date
Thu May 30 17:19:12 BST 2002
# date TZ=America/New_York
Thu May 30 12:19:30 EDT 2002 <----- wrong, should be BST time (or error!)
# date
Thu May 30 17:19:35 BST 2002
Attached is a patch against revision 1.52 of ash.c which moves the checks so
that checkalias is updated regardless of whether CONFIG_ASH_ALIAS is set.
With this patch applied, the command shown above which should generate an
error does generate an error.
I have tested this patch with the 'dd' command too and that now works
correctly.
2002-07-04 00:19:46 +00:00
Eric Andersen
887ca79f04
Scrub pwd.h and grp.h handling so we don't have to play any
...
silly games.
-Erik
2002-07-03 23:19:26 +00:00
Eric Andersen
0d2d1eb599
Fix a buffer overflow found by Gerardo Puga <gpuga@gioia.ing.unlp.edu.ar>
...
-Erik
2002-06-06 13:33:01 +00:00
Eric Andersen
1a92376f00
Patch from vodz to only setenv PATH when PATH changes, which is much
...
smarter than my quick fix.
2002-06-06 12:07:28 +00:00
Robert Griebl
ea1a63a201
Fix for broken handling off BusyBox's own pwd/grp implementations
...
[Parts of this patch may overlap with my other two patches]
2002-06-04 20:10:23 +00:00
Robert Griebl
64f70cc755
Add --login support. This is the bash way of starting a shell that should
...
parse the profile files.
2002-05-14 23:22:06 +00:00
Eric Andersen
1c31501b1b
Ensure that getenv("PATH") stays current, since otherwise cmdedit
...
(which calls getenv("PATH")) would not operate upon the current
PATH settings, which was really quite iritating.
-Erik
2002-04-26 23:40:09 +00:00
Eric Andersen
54c14d7850
vodz noted this line (as imported from Debian) is wrong, and has since
...
been fixed upstream.
2002-04-24 23:14:06 +00:00
Eric Andersen
ae1036185e
Apply last_patch37 from vodz
2002-04-24 23:08:23 +00:00
Eric Andersen
65a0730c9f
Patch from Jim Treadway and Vladimir Oleynik to Add CTRL-K
...
and fix CTRL-L support for cmdedit.c
2002-04-13 13:26:49 +00:00
Eric Andersen
4c9b68f0e0
Nice patch from Wolfgang Denk <wd@denx.de> to provide hush with
...
shell loops (for, while, until) and control operators (||, &&)
2002-04-13 12:33:41 +00:00
Tim Riker
497a88506e
make ash prompt the same as other shells if cmdedit and fancyprompt
2002-04-13 05:37:10 +00:00
Eric Andersen
85208e2ab9
Completely rework the config system so that it no longer annoys me to work on
...
the busybox development tree. This eliminates the use of recursive make, and
once again allows us to run 'make' in a subdirectory with the expected result.
And things are now much faster too. Greatly improved IMHO...
-Erik
2002-04-12 12:05:57 +00:00
Eric Andersen
889a301a0c
Patch from vodz to fix a potential segfault
2002-03-20 14:31:15 +00:00
Eric Andersen
d35c5df08c
Make private ash config options be public
2002-01-09 15:37:36 +00:00
Aaron Lehmann
438803311b
ash patch: errname-diff
2001-12-31 06:16:54 +00:00
Aaron Lehmann
9a218bf979
ash patch: initvar-diff
2001-12-31 06:13:38 +00:00
Aaron Lehmann
1a6986699f
ash patch: forkshell-diff
2001-12-31 06:12:48 +00:00
Aaron Lehmann
eec2bbb9bf
ash patch: fgcmd-diff
2001-12-31 06:07:57 +00:00
Aaron Lehmann
2aef3a6bb9
ash patch: breakcmd-diff
2001-12-31 06:03:12 +00:00
Aaron Lehmann
95877b6756
ash patch: addfname-diff
2001-12-31 06:00:57 +00:00
Eric Andersen
ceef50b280
Patch from vodz to fix broken function prototype
2001-12-21 11:22:26 +00:00
Eric Andersen
f1f2bd0b0a
Patch from vodz to implement ^L (clear screen)
2001-12-21 11:20:15 +00:00
Matt Kraai
1f0c43668a
Remove == TRUE' tests and convert
!= TRUE' and `== FALSE' tests to use !.
2001-12-20 23:13:26 +00:00
Eric Andersen
2423b12dae
Begin moving things to busybox.net
...
-Erik
2001-12-08 01:56:15 +00:00
Aaron Lehmann
b6ecbdc07d
The ash ansification diff!
...
Please tell me if you notice any problems resulting from this.
2001-12-06 03:37:38 +00:00
Matt Kraai
c8227639db
Change strdup calls to xstrdup (patch from Steve Merrifield).
2001-11-12 16:57:27 +00:00
Matt Kraai
a5f09c668e
Use fopen wrapper.
2001-11-12 16:44:55 +00:00
Eric Andersen
45784febaf
Some more minor build cleanups
2001-11-10 13:08:02 +00:00
Eric Andersen
282671bf76
Cleanup some config problems. Add a sane default config that basically
...
matches the default old Config.h
2001-11-10 12:07:24 +00:00
Eric Andersen
ec07469a3e
Patch from Aaron Lehmann <aaronl@vitelus.com>;
...
This diff does 2 things:
1) removes an unnecessary function. saves 64 bytes on i386
2) allows you to disable checking of mail (actually, it's now disabled
by default). this would be a nice CML1 option, but for now it's a
#(define|undef) in the C file like the other internal ash options.
this saves an additional 352 bytes if you leave mail disabled.
2001-10-31 11:05:49 +00:00
Eric Andersen
eaecbf33f7
Fixup some silly prototype warnings
2001-10-31 10:41:31 +00:00
Eric Andersen
69a20f0aca
Patch from ASA <llb@udm.net.ru> to that source files
...
are properly passed their arguments.
2001-10-31 10:40:37 +00:00
Eric Andersen
72f9a4277f
Add in some (theoretical) uClinux support. Some init cleanups
2001-10-28 05:12:20 +00:00
Eric Andersen
1a10eec178
Fixup the location of pwd.h and grp.h
2001-10-24 17:19:38 +00:00
Eric Andersen
a3483db55f
Patch from vodz:
...
1) complete true: $ > /tmp/tmpfile
2) the builtin pwd now does not unwrap symlinks
3) reduce 680 bytes
2001-10-24 08:01:06 +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
f4c208937c
Remove the now unused ARITH_* defines
...
-Erik
2001-10-19 00:08:17 +00:00
Eric Andersen
74400ccfd0
Scrub up some function prototypes.
...
-Erik
2001-10-18 04:11:39 +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
Manuel Novoa III
8d0afde412
Commit my changes to xxreadtoken() to reduce code size. Also set defines
...
so that the table implementations of copynode, calcsize, and cmdtxt are
used. Hopefully this will result in wider testing. ;-) If it breaks,
just unset the appropriate defines.
2001-09-11 01:14:02 +00:00
Eric Andersen
5bb1677f1d
define IFS_BROKEN
2001-09-06 18:00:41 +00:00
Eric Andersen
88cec25e99
Patch from vodz to make ash cope with leading redirections
...
(i.e. '2>/dev/null ls rubbish') will now work.
2001-09-06 17:35:20 +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
Manuel Novoa III
c639a35f50
I stupidly forgot one level of pointer indirection in the cmdtxt(), calcsize(),
...
and copynode() table implementations. Commit the fix but keep them disabled
until others check them out. Uncomment "//#define CMDTXT_TABLE",
"//#define CALCSIZE_TABLE", and "//#define COPYNODE_TABLE" to try them out.
Saves over 600 bytes on i386.
2001-08-12 17:32:56 +00:00
Eric Andersen
dd9173c07f
Fix a merging error
2001-08-10 21:11:56 +00:00
Manuel Novoa III
16815d4b45
A few bug fixes and significant size savings. Combined effort of
...
Vladimir N. Oleynik dzo@simtreas.ru , Aaron Lehmann aaronl@vitelus.com ,
and myself.
2001-08-10 19:36:07 +00:00
Eric Andersen
80dd0863e2
Small size optimization from Aaron Lehmann
2001-08-10 18:42:04 +00:00