Commit Graph

2078 Commits

Author SHA1 Message Date
Matt Kraai
edc806507c Fixed extra -- lines (noted by Christophe Boyanique). 2001-05-22 14:29:27 +00:00
Matt Kraai
117231c44f Make - read compressed data from stdin (thanks to Marius Groeger). 2001-05-22 14:23:02 +00:00
Matt Kraai
7f7348b7b2 Correctly remove leading slashes upon extraction (thanks to Marius Groeger). 2001-05-22 14:18:03 +00:00
Mark Whitley
1d9d41150b Fixed mishandling of -c & -l options and accounted for case when we're
grepping only one file.
2001-05-21 21:13:00 +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
Eric Andersen
abec344ab7 A couple more minor touchups 2001-05-21 17:58:01 +00:00
Eric Andersen
317827d9e5 Several cleanups for usage messages 2001-05-21 17:50:53 +00:00
Matt Kraai
73991ff925 Fix tell support. 2001-05-21 17:01:32 +00:00
Eric Andersen
ada18ff0f5 The latest patch from Larry 2001-05-21 16:18:22 +00:00
Eric Andersen
8ae319a322 This patch from Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de> is based on
the work of Jinux Kim on his "babobox" (derived from busybox-0.42), and enables
kernel module loading and unloading for uClinux/m68k.
2001-05-21 16:09:18 +00:00
Eric Andersen
2f6e1f880b Patch from Gernot Poerner <gp@it-netservice.de>. Adds in
mount bind support.
2001-05-21 15:59:34 +00:00
Matt Kraai
13a70ac2ab Fix open mode for IOCTLs which write to the tape. 2001-05-21 15:00:39 +00:00
Eric Andersen
9ffb7dd9a4 This is a patch from Vladimir:
> I rewrite *local_variable* function in hush.c with:
    > 1) remove many memory leaks
    > 2) add support read_only protect (require write builtin function for set this,
    > I write this special for variable HUSH_VERION=0.01)
    > 3) commad read set only local variable now
    > 4) remove many error messages if "set unset export" not defined variable
    > (bash syntax not put and set error code). Hmm, if I set result to -1, you hush
    > called waitpid and returned with error "no waitpid" ( i not found place this
    > error).
    > 5) destroy error in new version check xgetcwd()==NULL and set "(unknow)" -
    > this have error: crashe in next call `pwd`, but xgetcwd(not null) called
    > free(arg).
    > 6) next add integraion with libbb

Valdimir's patch missed two cases of local variable handling
    FOO=bar
    export FOO=baz
    unset FOO
and
    export FOO=bar
    FOO=baz
which were working before, so I fixed those two cases.
2001-05-19 03:00:46 +00:00
Eric Andersen
6197c51834 Fix an escape problem in the docs. Some \n's didn't have the '\'
escaped, and so were messsing the out output.
 -Erik
2001-05-18 23:14:53 +00:00
Mark Whitley
b6967635eb (Almost) brand-new version of cut that supports muitiple lists of positions,
per feature request from Tom Oehser.
2001-05-18 23:04:51 +00:00
Matt Kraai
1844770fec Changed snprintf copies to use strncpy at the suggestion of Aaron Lehmann. 2001-05-18 21:24:58 +00:00
Matt Kraai
d6ef07406d Rewrote copyfd to use library functions, terminate, and copy correct data. 2001-05-18 14:14:55 +00:00
Matt Kraai
6943815400 Fix applet_name. 2001-05-17 20:40:21 +00:00
Matt Kraai
231f998aba Switch from hstrerror to herror for libc5 systems. 2001-05-17 14:19:05 +00:00
Matt Kraai
7cedac567c Remove unused function. If necessary, we can use remove_file instead. 2001-05-17 04:03:22 +00:00
Matt Kraai
bc0f783a5f Fix invocation of builtin shell to have proper argc and argv. 2001-05-17 03:54:37 +00:00
Matt Kraai
233817437d Always print a newline after a matching substitution. 2001-05-17 01:02:58 +00:00
Eric Andersen
bfae2529b8 It turns out job control in both hush and lash was broken by the
signal handling in cmdedit.c.  Disabling it makes the shells behave
themselves again.  hush isn't quite there, but is getting close...
 -Erik
2001-05-17 00:14:27 +00:00
Eric Andersen
2439a59828 Remove/replace the "div" call. 2001-05-16 18:53:34 +00:00
Matt Kraai
8f7a4ad442 Add missing include, noted by Larry Doolittle. 2001-05-16 17:05:03 +00:00
Matt Kraai
bf381a0ad8 Whoops. Forgot the x. 2001-05-16 15:52:23 +00:00
Matt Kraai
c55b8d41c1 Add xgethostbyname and herror_msg* functions. 2001-05-16 15:40: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
bc604a2f41 Move init of a bunch of globals into main so we are at least
a bit more reentrant.
 -Erik
2001-05-16 05:24:03 +00:00
Eric Andersen
f72f562b2f Fix the behavior of local shell variables to match that of bash and ash.
-Erik
2001-05-15 23:21:41 +00:00
Eric Andersen
9abfe85e96 Suggestion from Larry: no format string, use fputs instead. 2001-05-15 20:11:49 +00:00
Eric Andersen
50ae3102fb Patch from Adam Heath <doogie@debian.org> to add arbitrary header support
to wget, so it can now do funky interactive things with cgi scripts.
2001-05-15 17:51:37 +00:00
Eric Andersen
55f9872616 This patch from Adam Heath <doogie@debian.org>, makes print_file
(used by cat, grep, sed, etc) quite a bit faster.
2001-05-15 17:48:09 +00:00
Eric Andersen
c911a4389b Patch from Vladimir:
1) fixed a bug that could crash df, mount, and umount applets if the root
    device name was longer then the word "root" (/dev/loop1 vs /dev/root) -
    2) severl functions needed static declaration in the umount applet
    3) update declaration for function in last_char_is() in libbb
2001-05-15 17:42:16 +00:00
Eric Andersen
15649c11f3 Oops. I left in some debug noise. 2001-05-15 17:28:26 +00:00
Eric Andersen
20a69a77d2 Write set_local_var() and fixup lookup_param() so you can now use
shell local variables.
 -Erik
2001-05-15 17:24:44 +00:00
Eric Andersen
78a7c99f7f This patch covers one big part of variable handling.
$ a=b foo
should be handled correctly.
$ a=b
is parsed OK, but the actual variable setting is not
yet written.  Except for some weird exceptions related
to quoting rules, this code passes (matches ash behavior)
all the tests I threw at it.

If someone now writes set_local_var(), and updates lookup_param()
to match, we can claim success!

       - Larry
2001-05-15 16:30:25 +00:00
Matt Kraai
be9f44a7df Fix incorrect length passed to accept noted by Larry Doolittle. 2001-05-15 03:05:39 +00:00
Mark Whitley
336480fe6f Added some testcases for grep and sed (many more could still be added) 2001-05-14 21:18:54 +00:00
Mark Whitley
d928accbbd ...Need to print just a few more newlines. 2001-05-14 20:44:26 +00:00
Eric Andersen
2416dfc3c9 A compromise solution for insmod 2001-05-14 20:03:04 +00:00
Mark Whitley
dd527d3c62 ...And now that we're chomping lines, we need to re-add the newline later... 2001-05-14 19:53:08 +00:00
Mark Whitley
9de2659264 We will chomp() lines so REG_NEWLINE does not break stuff. Thanks, Matt. 2001-05-14 19:44:44 +00:00
Mark Whitley
35e59bed97 Fixed a subtle bug in the handling of -l and -c flags. 2001-05-14 19:40:32 +00:00
Mark Whitley
452cc1f293 Added REG_NEWLINE as cflags to xregcomp for normal addresses so EOL $ will work 2001-05-14 19:23:02 +00:00
Matt Kraai
9496466044 Follow symbolic links when searching for modules. 2001-05-14 18:27:25 +00:00
Eric Andersen
14d354312a Per suggestion from Vladimir, eliminate check_wildcard_match(), which
was only being used by insmod these days.

Also, I spent a minute adjusting insmod so that it first searches
/lib/modules/`uname -r` and then (if that fails) searches /lib/modules,
which makes bb insmod behave much more like the real insmod, and should
avoid nasty surprises (such as the recent "Modutils vs. Busybox..."
thread).
 -Erik
2001-05-14 17:07:32 +00:00
Matt Kraai
cb378a5267 Add missing periods and delete superfluous whitespace. 2001-05-14 06:35:15 +00:00
Eric Andersen
a17b3631fe Do not ever change permissions on existing directories, only
on directories we created while extracting a tarball.  Fix
based on bug report and patch from Konstantin Boldyshev
<konst@linuxassembly.org>
 -Erik
2001-05-13 15:39:30 +00:00
Eric Andersen
95a349f427 When doing a 'wget -O -' turn on the quiet flag, lest the status bar
noise get mingled with the retrieved webpage.
 -Erik
2001-05-13 00:55:54 +00:00