Commit Graph

174 Commits

Author SHA1 Message Date
Eric Andersen
c94e89d81f Do not depend on PATH or getopt arg reordering 2002-01-06 01:08:28 +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
fb74a45088 Vodz' last_patch31
Very minimal last corrections:

    1) busybox.c: fix warining
    2) docs/: add applets for list from pwd_grp
    3) usage.h: add -n option for route
    4) run_parts.c: many todo fix for busybox style
    5) addgroup.c: add #ifdef CONFIG_FEATURE_SHADOWPASSWDS, reduce one
    perror_msg
    6) adduser.c: fix bug "variable i not initialize" and
       add #ifdef CONFIG_FEATURE_SHADOWPASSWDS
2001-12-18 14:06:03 +00:00
Eric Andersen
730f826f25 Add in a new restart init target, triggered by SIGHUP. Patch from
Russ Dill, with adjustments by me.
 -Erik
2001-12-17 23:13:08 +00:00
Eric Andersen
b24d65659f If find_pid_by_name() had an error, it was returning -1, but storing
that into a pid_t, which is unsigned on a number archs.  Furthermore,
find_pid_by_name() would _never_ return an error if the intended proces
was "init", but instead would return 1, meaning we would fail to work
on 2.4.x kernels running an initrd...
 -Erik
2001-12-06 14:52:32 +00:00
Eric Andersen
ed8a9be287 Patch from Dan Langlois <dan@somanetworks.com> Support SIGSTOP/SIGCONT
for wierd situations when people want init to actualy stop doing
anything for a while...
2001-11-30 19:10:58 +00:00
Eric Andersen
2480e3a30a Fix dangling comma 2001-11-21 09:05:31 +00:00
Eric Andersen
f435a918fa S390 wierdness 2001-11-20 05:42:57 +00:00
Eric Andersen
fedce06b7f Hide some ifdefs to make it more readible 2001-11-17 07:27:14 +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
7d6829096d Add the run-parts applet submitted by Emanuele Aina
<emanuele.aina@tiscali.it>
2001-10-31 10:59:29 +00:00
Eric Andersen
6cf47a79ac Run parts applet by Emanuele Aina <faina.mail@tiscalinet.it> 2001-10-31 10:24:36 +00:00
Eric Andersen
950d8b496f patch from vodz:
I reduce 148 bytes from start_stop_daemon.c code. Also reduced
    memory allocated.
2001-10-31 09:55:39 +00:00
Eric Andersen
813d88cf78 As Aaron Lehmann just pointed out, I forgot a line... 2001-10-28 22:49:48 +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
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
c2af1ee036 Commit the start-stop-daemon applet. This was contributed by David
Kimdon <dwhedon@gordian.com> on october 7th -- the day I was fired from
Lineo.  So it seems I totally forgot about this patch until now.
Sorry about that David!
2001-10-18 19:33:06 +00:00
Eric Andersen
74400ccfd0 Scrub up some function prototypes.
-Erik
2001-10-18 04:11:39 +00:00
Eric Andersen
11fdb8a4c7 Fix a nasty bug with variable name shadowing 2001-10-18 04:04:34 +00:00
Eric Andersen
371ca19f53 Look for either "init" or "linuxrc" processes 2001-10-03 21:26:12 +00:00
Eric Andersen
1644db9a2b Two patches from Magick <magick@linux-fan.com>:
1st makes init smaller, and fixes a bug with AskFirst. Reading from
    /dev/null gives EOF.
    2nd makes init run the command's in the order of inittab, as in
    FIFO instead of LIFO.
2001-09-05 20:18:15 +00:00
Matt Kraai
439e3df653 Add support for devfs device names. 2001-07-23 14:52:08 +00:00
Eric Andersen
8d79ce8320 Some patches to make dietlibc work... 2001-07-22 23:00:15 +00:00
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