Commit Graph

150 Commits

Author SHA1 Message Date
Eric Andersen
332394b577 Be extra extra careful about what we dereference. 2001-07-05 16:09:32 +00:00
Matt Kraai
7bd773c9fe Only use a login shell when it will run on a console. 2001-06-12 20:55:02 +00:00
Matt Kraai
67a4640333 Loop forever instead of exiting. 2001-06-03 05:55:52 +00:00
Eric Andersen
77d9268892 Patch from larry to fix some grammar errors. 2001-05-23 20:32:09 +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
Eric Andersen
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
2001-04-25 05:39:18 +00:00
Eric Andersen
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
2001-04-23 15:14:11 +00:00
Matt Kraai
8fc364ebd5 Fix comment. 2001-04-12 20:12:16 +00:00
Eric Andersen
2f2da90fd4 "I will always compile before I commit" x 100 2001-04-09 23:54:15 +00:00
Eric Andersen
b6b519b416 Update how we detect if libc5 is in use.
-Erik
2001-04-09 23:52:18 +00:00
Eric Andersen
e76c3b08e1 A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
shadowed variables.  Move (almost) all syscalls to libbb/syscalls.c, so I can
handle them sanely and all at once.
 -Erik
2001-04-05 03:14:39 +00:00
Eric Andersen
c97ec34370 A patch from Matt Kraai that adds a new 'shutdown' action to busybox init. Now
you can specify an arbitrary behavior for 'ctrlaltdel' without that behavior
needing to be a reboot.
2001-04-03 18:01:51 +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
7ef1a5beb2 Fix up command line munging in init. Postpone the askfirst thing till
a bit later in run().
2001-03-20 17:39:08 +00:00
Eric Andersen
7f1978570f A patch from Andreas Neuhaus to be especially careful to not dup
any env variables when spawning child processes.
2001-03-16 01:14:04 +00:00
Eric Andersen
a4edd0e946 A better fix. Read nextPtr before mem gets freed.
-Erik
2001-03-15 21:04:18 +00:00
Eric Andersen
0d4e51d390 Prevent init from potentially using already freed memory when
deleting an initAction, fixing a bug pointed out by Andreas Neuhaus
 -Erik
2001-03-15 19:18:21 +00:00
Eric Andersen
53f5061c7e Fix init so that checking for terminal devices is delayed until the
devices are actually used, thereby allowing devfsd based systems to
work.  This should fix bug #1133
 -Erik
2001-03-14 09:01:11 +00:00
Eric Andersen
3e6ff9017f A cleanup patch from Jeff Garzik to static-ify a number of
namespace polluting things that really should be static.
2001-03-09 21:24:12 +00:00
Eric Andersen
452fd33ffa Patch from Vladimir to make sure PATH is set correctly. 2001-03-04 06:47:33 +00:00
Eric Andersen
41492d6c23 I should be more careful... 2001-02-23 00:05:56 +00:00
Eric Andersen
544891dd26 Add in kent robotti's updated dos2unix.c 2001-02-22 23:37:30 +00:00
Eric Andersen
dbcd8ce464 Make init compile when DEBUG_INIT is enabled
-Erik
2001-02-22 04:55:33 +00:00
Eric Andersen
8fc300976f Revert my change to do extra termType checking. That is done elsewhere.
Silly me.
 -Erik
2001-02-22 00:50:20 +00:00
Eric Andersen
477aedd77f Commit a patch from Erik Gustavsson <cyrano@algonet.se>, to allow
environment variables set from the kernel command line to be inherited
bu application programs.  Slightly changed to special case handling of
TERM, so that it has sane defaults when on a serial console.
 -Erik
2001-02-20 18:01:50 +00:00
Eric Andersen
cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
header file usage before the 0.49 release.  To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
 -Erik
2001-02-20 06:14:08 +00:00
Eric Andersen
f6a7227fd6 Throw out the obsolete INIT_CHROOT junk 2001-02-17 00:40:32 +00:00
Eric Andersen
67991cf824 This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Eric Andersen
af4ac77d9d Apply a patch from Larry Doolittle to add "-all" and "-none" switches
to multibuild.pl.  I did a little formatting adjustments to make it
_very_ obvious when things stop working.  I also removed the USE_PROCFS
config option -- just do the right thing when USE_DEVPS_PATCH is enabled.
 -Erik
2001-02-01 22:43:49 +00:00
Eric Andersen
53cfb7e231 Patch from Vladimir N. Oleynik to simplify/cleanup a few things in init.c 2001-01-31 17:29:47 +00:00
Eric Andersen
ed3ef50c23 Fix header file usage -- there were many unnecessary header files included in
busybox.h which slowed compiles.  I left only what was needed and then fixed up
all the apps to include their own header files.  I also fixed naming for pwd.h
and grp.h functions.  Tested to compile and run with libc5, glibc, and uClibc.
 -Erik
2001-01-27 08:24:39 +00:00
Eric Andersen
3862423884 Add in Larry's CUSTOMIZED_BANNER patchlet, and let folks know that
BB_FEATURE_INIT_CHROOT needs to be rewritten to use pivot_root.
 -Erik
2001-01-25 00:04:16 +00:00
Mark Whitley
59ab025363 #define -> static const int. Also got rid of some big static buffers. 2001-01-23 22:30:04 +00:00
Eric Andersen
21125543e1 A couple of updates to fix some minor cross compiling issues 2000-12-13 16:41:29 +00:00
Eric Andersen
e3a48d865a Cleanup for proper compilation with uClibc. 2000-12-12 23:22:35 +00:00
Mark Whitley
f57c944e09 Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
2000-12-07 19:56:48 +00:00
Eric Andersen
bc5941a540 Close but #1071... 2000-12-06 23:17:37 +00:00
Eric Andersen
3570a34de4 Renamed "internal.h" to the more sensible "busybox.h".
-Erik
2000-09-25 21:45:58 +00:00
Eric Andersen
f34aa4c378 Hard code the name of init. 2000-09-21 02:32:11 +00:00
Pavel Roskin
33bee33af0 Don't suppress output of umount and swapoff - it is both unwise
and incompatible with lash that doesn't support >&1 yet.
2000-09-15 01:02:50 +00:00
Pavel Roskin
cbe05e45db For "askfirst" don't just read one char from stdin,
read the whole line using getc(), so that everything before Enter
gets discarded.
2000-09-14 22:47:29 +00:00
Eric Andersen
7e3bf6e339 Add in a patch from robotti@metconnect.com and Chip Rosenthal to make
init do login shell stuff.
 -Erik
2000-09-14 22:01:31 +00:00
Eric Andersen
fb6a50820c Ensure forked processes always are on a controlling tty, so the
^C can be properly sent to /dev/console.
 -Erik
2000-09-13 16:15:29 +00:00
Eric Andersen
cbb61c78ae Make init handle current 2.4.x sysinfo behavior
-Erik
2000-09-10 16:13:41 +00:00
Eric Andersen
3639c5d950 Set environment variable to make ash happy. ash is a frequent enough
target....
2000-09-05 17:57:52 +00:00
Matt Kraai
27a804246a Centralize handling of --help. 2000-07-19 19:24:01 +00:00
Matt Kraai
2f46b664b7 Add usage messages for applets without them. 2000-07-19 18:01:00 +00:00
Pavel Roskin
9c5fcc3408 New message added to messages.c: full_version
Used where possible
2000-07-17 23:45:12 +00:00
Pavel Roskin
9027bcf2f4 Fixed a warning about missing initializer 2000-07-14 15:44:25 +00:00
Matt Kraai
e58771e73c Use global applet_name instead of local versions. 2000-07-12 15:38:49 +00:00