8f3e51b4ad
Patch from Vladimir to remove testing stuff from stty
Eric Andersen
2001-05-07 22:47:45 +00:00
8d35134ad8
A bug fix from Vladimir for a memory leak I stupidly added to which.c.
Eric Andersen
2001-05-07 22:45:06 +00:00
83a2ae2184
More hush updates from Larry: Update some comments. Generate partial placeholders for the missing builtins. Write builtin_umask. Properly treat exec without arguments as a means to open/close files within the running script. Implement "4<&-" that encodes for file descriptor closure.
Eric Andersen
2001-05-07 17:59:25 +00:00
7e1273edf7
Patch from Jim McQuillan to pass the terminal type to the remote host.
Eric Andersen
2001-05-07 17:57:45 +00:00
238bc4090d
Per comment from Jim McQuillan <jam@mcquil.com>, don't log syslogd startup/shutdown messages as KERN.EMERG, but use SYSLOG.INFO instead.
Eric Andersen
2001-05-07 17:55:05 +00:00
da7f095c12
Update comment re USE_SYSTEM_PWD_GRP -Erik
Eric Andersen
2001-05-07 17:51:34 +00:00
28355a36da
Per some comments from Lars Kellogg-Stedman <lars@larsshack.org>, make xreadlink() return NULL on failure, and make sure everyone uses the interface correctly. -Erik
Eric Andersen
2001-05-07 17:48:28 +00:00
822c3837f9
Another vi update from Sterling Huxley:
Eric Andersen
2001-05-07 17:37:43 +00:00
713b398700
woops, forgot the break statment
Glenn L McGrath
2001-05-07 12:06:37 +00:00
5bcfc9ba1a
Tolerate -q argument, if -q is passed give a warning and continue rather than just fail
Glenn L McGrath
2001-05-07 12:01:58 +00:00
cc0aa0f2d7
Actually we dont need to check if the device is nfs as it wont be stat'ed
Glenn L McGrath
2001-05-07 01:51:24 +00:00
1b62619446
woops, i shouldnt be so presumtuous? about what the error will be
Glenn L McGrath
2001-05-07 01:40:59 +00:00
3aae10014c
Device may not be a real filename
Glenn L McGrath
2001-05-07 01:38:03 +00:00
2e6c878763
Rewrite -c and -b processing to shrink code and eliminate buffer overrun.
Matt Kraai
2001-05-05 16:19:13 +00:00
6b8c550d88
include libbb.h after other includes
Glenn L McGrath
2001-05-05 03:19:12 +00:00
2dcfba7117
Larry's variant on Evin Robertson's fix to what I messed up trying to make job control work. This fix makes it so that hush doesn't error out when init hasn't set up job control, as in when init=/bin/sh
Eric Andersen
2001-05-04 22:13:37 +00:00
044a72d0d5
Larry suggested using concat_path_file() would be an even safer bet for 'which'. I ageed, so I whipped this up -- which revealed a bug in concat_path_file. It turns out that that a '/' can be appended from either the path _or_ the filename, but only the former was checked. -Erik
Eric Andersen
2001-05-04 22:04:24 +00:00
a0ba9f45fb
Wrote documentation and scripts for creating a busybox boot floppy. Initial revision.
Mark Whitley
2001-05-04 21:46:00 +00:00
d24f878546
Don't reset parents context when we encounter an terminator. Fixes if true; then if true; then true; fi; fi
Matt Kraai
2001-05-04 21:20:20 +00:00
7526f035f4
Fix a buffer overflow. Which accounted for the size of the path, plus the the '/', plus the size of the test command. It did not account for the terminating NULL, which overwrote the end of the string. -Erik
Eric Andersen
2001-05-04 20:47:33 +00:00
e5ffb911e8
If it fails to run a builtin, let it fall through to exec the real thing. -Erik
Eric Andersen
2001-05-04 16:30:29 +00:00
e6bf66eada
Fix two bugs reported by Ralph Jones.
Matt Kraai
2001-05-04 14:49:58 +00:00
b0aca921be
A todo update from larry to acknowledge the existance of hush
Eric Andersen
2001-05-03 17:35:48 +00:00
87d893c04b
devfs does not support creation of regular files. So change the test a bit so as to not possibly create a regular file. -Erik
Eric Andersen
2001-05-03 07:01:41 +00:00
6689140597
Remove summary header. Not present in GNU or SUSv2.
Matt Kraai
2001-05-03 04:45:40 +00:00
80abc45182
Move up waitpid error check so that errno isn't clobbered by tcsetpgrp.
Matt Kraai
2001-05-02 21:48:17 +00:00
adcbc12d85
Canonicalize path before trying to unmount it.
Matt Kraai
2001-05-02 21:24:51 +00:00
3425111bb9
Fix bug #1108 by always canonicalizing arguments.
Matt Kraai
2001-05-02 21:17:38 +00:00
0fcd447d59
Some more job control updates. It will now sucessfully background stuff. Good luck getting things back into the foreground though... -Erik
Eric Andersen
2001-05-02 20:12:03 +00:00
20a3069ec0
Don't treat newline as pipe separator when processing substitutions.
Matt Kraai
2001-05-02 17:52:49 +00:00
19ec9ee91e
Use .png for images (removing all .gifs) and make them all 90x36 -Erik
Eric Andersen
2001-05-02 17:19:25 +00:00
9f8caf134f
Fix $(...) construction. Noted and patched by Larry Doolittle <ldoolitt@recycle.lbl.gov>. I'm just a patch whore. :)
Matt Kraai
2001-05-02 16:26:12 +00:00
bafd94f154
First pass at getting job control working. This gets the infrastructure in place, but something is still missing/wrong in there. Testing with 'grep foo &' seems to put _hush_ into the background. Pondering... -Erik
Eric Andersen
2001-05-02 16:11:59 +00:00
1c8a59ab95
Use the current pgrp, not pid, when resetting the foreground process group. Fixes bizarre suspension when executing echo.
Matt Kraai
2001-05-02 15:37:09 +00:00
f162e7d09d
Don't segfault if the first word is the empty string.
Matt Kraai
2001-05-02 14:48:48 +00:00
e67c3ce327
Another update from Larry: Makes hush return code equal to that of the last command executed. Fixes the mode where input comes from a file.
Eric Andersen
2001-05-02 02:09:36 +00:00
e0244b0642
Skip headers with empty filenames, rather than stopping.
Matt Kraai
2001-05-01 21:12:31 +00:00
b9f5b82339
Another refinement, this time from Larry.
Eric Andersen
2001-05-01 16:24:32 +00:00
6d553ef200
Argh. Now we break non-pristine builds. Check a bit more carefully. -Erik
Eric Andersen
2001-05-01 14:54:35 +00:00
abde065935
Oops. The dangers of applying patches by hand...
Eric Andersen
2001-05-01 14:37:03 +00:00
4ed5e37d4b
Another hush update from Larry:
Eric Andersen
2001-05-01 01:49:50 +00:00
3f99b567b8
A patch from Larry to fix pristine source builds (again). I just can't seem to _not_ break it. Sigh.
Eric Andersen
2001-05-01 01:40:34 +00:00
aac75e5a78
Some more hush.c updates from Larry Doolittle.
Eric Andersen
2001-04-30 18:18:45 +00:00
0e9aef36fa
Oops. I was a bit too hasty and also changed applet_name.
Eric Andersen
2001-04-30 18:18:02 +00:00
8a633268ef
Made new xreadlink function for libbb and changed applets to use it instead of readlink(2).
Mark Whitley
2001-04-30 18:17:00 +00:00
6f34394454
These messages can be .rodata, so make them even more const. -Erik
Eric Andersen
2001-04-30 18:08:03 +00:00
65504ac12c
These do not need initial values. Let them live in the bss. -Erik
Eric Andersen
2001-04-30 18:07:24 +00:00
defa4f93c2
Per suggestion by Matt, make sh.c a real target. There is no need for the useless sh_link dummy target -- use the real thing. -Erik
Eric Andersen
2001-04-30 17:52:36 +00:00
218aa370b4
Fix user permissions of copied directories.
Matt Kraai
2001-04-30 17:32:43 +00:00
43ca13714b
Simplify permission handling for FIFOs.
Matt Kraai
2001-04-30 16:43:21 +00:00
24abecc349
Fix exit status when there is an error copying a file.
Matt Kraai
2001-04-30 16:37:04 +00:00
af166e7ce0
Logic reversal for last_char_is
Glenn L McGrath
2001-04-29 00:50:33 +00:00
2bf4dad7ec
fix to applet_source_list rule so Debian package continues to build
David Kimdon
2001-04-28 16:37:23 +00:00
07e462fd6d
Matt was complaining. Hopefully this helps the sh.c link situation
Eric Andersen
2001-04-27 18:36:43 +00:00
72ab975a6b
Terminate source correctly when copying symlink. Report and patch by Brian Webb <webbb@desertscenes.net>.
Matt Kraai
2001-04-27 15:40:27 +00:00
088875fec4
Use BUFSIZ for the_command to match size used in cmdedit
Eric Andersen
2001-04-27 07:49:41 +00:00
af44a0e8f4
An update to hush from Larry: It should recover more smoothly from syntax errors, and it now has a decent guess when the reserved word construct is over (or not) to control execution and prompting. I took out all the redundant standalone test copies of libbb routines, but left in a hook so I can include those for my testing. I'll post that include file on my web site.
Eric Andersen
2001-04-27 07:26:12 +00:00
0081466925
Be a bit more sneaky about the sh.c symlink so you don't need to do a mke clean for it to happen. -Erik
Eric Andersen
2001-04-26 23:29:10 +00:00
0f9426edb0
Ignore some generated files
Eric Andersen
2001-04-26 23:23:04 +00:00
25f2703015
This is the initial checkin of Larry Doolittle's hush.c, using his April 25, 2001 snapshot, adjusted a bit by me so it has cmdedit support.
Eric Andersen
2001-04-26 23:22:31 +00:00
a1dbc22469
Disable lash -Erik
Eric Andersen
2001-04-26 23:10:22 +00:00
924ab5b7d3
These days busybox.pod is autogenerated, so it should be removed from CVS.
Eric Andersen
2001-04-26 23:06:39 +00:00
7f3b86e7bf
A fix from Larry for a corner case where insmod could end up doing an xrealloc(0).
Eric Andersen
2001-04-26 19:29:58 +00:00
6aabfd5e30
Fix handling of permission addition and removal (e.g., o-r).
Matt Kraai
2001-04-26 18:55:29 +00:00
ca85cdbe4c
Doh. I never allocated storate for the struct stat I am using. There was just a never initialized pointer. -Erik
Eric Andersen
2001-04-26 18:43:36 +00:00
468f504fd7
Fix handling of -R flag.
Matt Kraai
2001-04-26 18:27:47 +00:00
c1bdffe99b
Another nice cleanup from Larry. This adds a new last_char_is() function and uses it to avoid possible buffer underruns whn strlen is zero, and avoid the possible space-hogging inline of strlen() in several cases. -Erik
Eric Andersen
2001-04-26 15:56:47 +00:00
3c3277f0bd
As Larry pointed out, this the off by one canbe fixed much more elegantly.
Eric Andersen
2001-04-26 15:41:51 +00:00
30592a5451
Fix a silly off-by-one error noticed by Santiago Garcia Mantinan <manty@debian.org> -Erik
Eric Andersen
2001-04-26 14:56:45 +00:00
e55987896a
Applied patch from Larry Doolittle to fix pristine build breakage.
Mark Whitley
2001-04-25 23:49:43 +00:00
2789906aad
Removed obsoleted BB_FEATURE_RM_INTERACTIVE
Mark Whitley
2001-04-25 22:08:56 +00:00
207587a9b4
Applied patch from I.Q. to add -s to cmp.
Mark Whitley
2001-04-25 20:41:02 +00:00
c29c44c00e
libbb.h now includes ../busybox.h. This way, files in libbb that have BB_[FEATURE] #defines won't be ignored. Credit to Magnus Damm for spotting this.
Mark Whitley
2001-04-25 18:06:21 +00:00
4f4bcfcd1a
Some more cleanups for insmod from Larry. -Erik
Eric Andersen
2001-04-25 17:22:32 +00:00
c57a75d896
Larry noticed that chown and chgrp has the version numbers off a bit for glibc's lchown support. Thanks Larry.
Eric Andersen
2001-04-25 17:12:33 +00:00
4b541a8817
Moved some #ifdefs down below #include "busybox.h" where they belong.
Mark Whitley
2001-04-25 17:10:30 +00:00
67d7fe66e7
Sync'ed up the olympus section between this and stock Config.h
Mark Whitley
2001-04-25 17:05:51 +00:00
4f3558af17
Fixed a BB_MTAB #define buglet reported by Magnus Damm.
Mark Whitley
2001-04-25 17:03:40 +00:00
04095e58fb
Move messages.c to libbb. Make each string in messages.c be its own .o file. This way, we can new get rid of all that tedious #define rubbish we used to need to enable specific messages. This way is enormously simpler, and as a bonus also ends up saving us 96 bytes. -Erik
Eric Andersen
2001-04-25 05:39:18 +00:00
3676374915
Cleanup more carefully after pod2html
Eric Andersen
2001-04-24 21:46:07 +00:00
f227815c3a
Several cleanups from Larry.
Eric Andersen
2001-04-24 21:41:41 +00:00
8810bdbba3
Rewrote rm.
Matt Kraai
2001-04-24 20:04:18 +00:00
9f0fedb8f6
Split up chmod_chown_chgrp.c into 3 separate apps. This unfortunately adds 384 bytes to the overall size. But having each app be standalone is the Right Thing(tm) so we will just have to live with it. -Erik
Eric Andersen
2001-04-24 18:07:19 +00:00
3a4aef5a4c
Update applet define from BB_CP_MV to BB_CP and BB_MV.
Matt Kraai
2001-04-24 15:19:04 +00:00
01441036e9
Use generic flag names.
Matt Kraai
2001-04-24 01:30:02 +00:00
9ff9325e60
Move applet_name declaration from busybox.h to libbb.h.
Matt Kraai
2001-04-24 01:12:33 +00:00
af030496fa
Applied patch from Larry Doolittle to remove some strlen calls, and add one paranoia check to avoid buffer underrun. Saves 120 text bytes.
Mark Whitley
2001-04-23 23:16:20 +00:00
de1b262942
Remove file obsoleted by cp/mv rewrite.
Matt Kraai
2001-04-23 19:48:26 +00:00
91b2855ba8
Rewrite cp and mv to be SUSv2 compliant.
Matt Kraai
2001-04-23 18:53:07 +00:00
4e9267d76c
Reversed last patch; unnecessary.
Mark Whitley
2001-04-23 17:56:27 +00:00
4b66dabc76
Added a sanity check to fix weird bug exposed when sourcing in commands from a file with lash. Based on report from Heinz Walter.
Mark Whitley
2001-04-23 17:04:41 +00:00
8a24a65d2f
Change link order so that libbb functions use libpwd.a when appropriate.
Matt Kraai
2001-04-23 16:11:57 +00:00
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.
Eric Andersen
2001-04-23 15:28:28 +00:00
d8862928c2
A patch from Marc Karasek and Kanoj (kernel serial.c maintainer) so init will work on serial consoles with 2.4.3+ kernels, thanks to Fabrice Gautier <gautier@email.enst.fr> for finding this one. -Erik
Eric Andersen
2001-04-23 15:14:11 +00:00
f5c358bc98
Simplify file_prefix handling, and use of *dir variable.
Glenn L McGrath
2001-04-23 13:52:02 +00:00
782ab3ccf8
Simplify pathname building, in which a bug was noted by Larry Doolittle, a patch was provided by Vladimir Oleynik, and am improved patch commited by me.
Matt Kraai
2001-04-23 01:07:00 +00:00
ee0d93ed04
Fix horrible, horrible memmory leak. I wondered why processes were dying !
Glenn L McGrath
2001-04-21 10:26:15 +00:00
89dc02d944
Clearly define out exclude list code, as recommended by Larry Doolittle
Glenn L McGrath
2001-04-21 02:12:13 +00:00
56c14a6473
Fixed a buglet where an extra newline was being added after an insert command in some cases.
Mark Whitley
2001-04-20 23:41:44 +00:00
497ef46587
Made a correction to a bad test expression. Props to Larry Doolittle for spotting this one.
Mark Whitley
2001-04-20 23:27:17 +00:00