Eric Andersen
81155f8fa8
Update definition of struct serial_struct, per linux-2.6.0-test5,
...
to avoid stack corruption problems on some 64bit architectures
when sizeof(void*) != sizeof(int). Thanks to Atsushi Nemoto
for finding this problem.
2003-09-11 08:52:22 +00:00
Glenn L McGrath
99bd5adf99
more crond+crontab integrating with loginutil libbb functions and deleted
...
patch from Thomas Gleixner to init.
Viodz last_patch_108
2003-09-03 12:18:42 +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
ce6482eace
Fix overflow for machines greater than 4GB, return unsigned int to avoid
...
a cast and for greater accuracy.
2003-08-26 02:14:58 +00:00
Eric Andersen
9cdef5d928
Yang Xiaopeng writes:
...
>I'm sure that no user process use old root now, but when run "umount
>/old_root", it says:
> umount: /old_root: Device or resource busy
>
>I have tried to remount /proc within the new root *after* chroot, but
>get the same result.
>
>
I found the problem, I said that no user process use old root when run
my scripts, but
I'm wrong, actually there is a '3' fd open the file
"/old_root/dev/console". By adding
debug message in init/init.c, I found the problem: when init restart(in
exec_signal()),
before open the new terminal device, there is still a file opened(I
don't know which file it is), so the
terminal device(stdin) get fd '1', and the first dup(0)(stdout) return
'2', the second(stderr) return '3'.
I attach a simple patch to solve this problem.
2003-07-29 06:33:12 +00:00
Eric Andersen
a1ed06b047
Move start_stop_daemon to debianutils.
...
Cleanup run_parts a bit and add long opts
2003-07-26 09:16:00 +00:00
Eric Andersen
aa820dbc00
cleanup and add long options
2003-07-26 09:10:35 +00:00
Eric Andersen
d5868c1692
Patch from Thomas Gleixner to reap any zombie processes that are
...
reparented to init...
2003-07-26 06:25:12 +00:00
Eric Andersen
20c9f1e5e7
Several simplifications and indenting changes, per
...
last_patch97 from vodz
2003-07-22 17:14:10 +00:00
Eric Andersen
4c6c236781
As vodz noticed, I screwed up reboot
2003-07-22 17:04:54 +00:00
Eric Andersen
6fd0e31e87
Patch from Andrew Flegg:
...
Here's a pretty crude patch to reload /etc/inittab when init receives a
SIGHUP. The mailing list archives weren't entirely clear on whether or
not it should already happen, but didn't appear to be.
The patch:
* Adds a new function, reload_signal() which just calls
parse_inittab() and run_actions(RESPAWN)
* Before entering the while (1) loop set up SIGHUP to call
reload_signal()
* Modify new_init_action to skip the action if the same command
already exists on the same terminal
This last bit means that changing already running entries is a bit
hairy as you can end up with, for example, two shells running on the
same virtual console. However, for solely adding/removing entries this patch
seems to work quite well.
2003-07-22 09:48:56 +00:00
Eric Andersen
0246222351
Support reboot, halt, and poweroff independent of busybox init.
...
Simplify and fixup some logic.
-Erik
2003-07-22 09:41:39 +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
fb0c6af286
Patch from Lars Kellogg-Stedman:
...
The attached two patches add config documentation to init/Config.in and
fileutils/Config.in.
2003-07-14 19:18:43 +00:00
Eric Andersen
d5a2780aa2
oops
2003-07-05 08:39:47 +00:00
Eric Andersen
3c8064ff69
Daniel writes:
...
I've found a problem with job control when the init process is restarted.
If the system boots for the first time, I get job control on a serial terminal -
no problems. However, when I restart init by issuing "init -q", then the shell
no longer has job control.
I traced this a problem in console_init in the file init.c. What was happening
after the restart is that the first compare
if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
...
} else if (ioctl(0, VT_GETSTATE, &vt) == 0) {
...
} else {
... // assume /dev/console
}
returned error and subsequently the code assumes /dev/console as the console,
which does not support job control.
Checking the errno after the first call showed that the system was complaining
about the file descriptor. This is probably because the previous init process
had closed all its file descriptors which the new init process had inherited.
2003-07-05 08:29:01 +00:00
Eric Andersen
65e20a33c2
Patch from Kent Robotti adding a bunch of needed docs!
...
-Erik
2003-07-05 07:52:35 +00:00
Eric Andersen
b01ed65ad2
Apply last_patch93 from vodz:
...
andersen@busybox.net wrote:
>Message: 4
>Modified Files:
> init.c
>Log Message:
>Remove code for unsupported kernel versions
Hmm. Current init.c have check >= 2.2.0 kernel one time too.
Ok. Last patch removed this point and move common init code to new file for
/init dir
2003-06-27 17:08:15 +00:00
Eric Andersen
0b0d393347
Remove bdflush garbage, which is only relevant to unsupported
...
kernel versions
2003-06-27 05:46:29 +00:00
Glenn L McGrath
1e11c34be4
minit, a Minimal init system.
2003-05-11 14:52:39 +00:00
Eric Andersen
2c1de61023
There have been many reports of init failing to reboot and/or failing to halt
...
over the years. Well I finally took the time to track this down. It turns out
that inside linux/kernel/sys.c the kernel will call
machine_halt();
do_exit(0);
when halting, or will call
machine_power_off();
do_exit(0);
during a reboot. Unlike sysv init, we call reboot from within the init
process, so if the call to machine_halt() or machine_power_off() returns, the call to do_exit(0) will cause the kernel to panic. Which is a very
bad thing to happen.
So I just added this little patch to fork and call the reboot
syscall from within the forked child process, thereby neatly
avoiding the problem.
But IMHO, both calls to do_exit(0) within linux/kernel/sys.c
are bugs and should be fixed.
-Erik
2003-04-24 11:41:28 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Eric Andersen
22237017a7
Fix a silly compile error, thanks to a patch from Wen-chien Jesse Sung
2003-01-23 07:08:26 +00:00
Glenn L McGrath
b4a1baa312
Correct some init issues, update email address, last_patch78 by Vladimir
...
N. Oleynik
2003-01-13 22:09:50 +00:00
Eric Andersen
cf1fee06a5
Odd. I never brought this forward from bb.stable. Should handle
...
reaping child processes better.
-Erik
2002-12-17 09:48:16 +00:00
Glenn L McGrath
4e05b9b043
include "busybox" after the libc includes tofix compile errors
2002-12-07 23:14:40 +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
Glenn L McGrath
efdd0aed23
Use error_msg instead of fprintf(stderr
2002-11-28 09:40:36 +00:00
Glenn L McGrath
8f0722a53b
Move readlink, mktemp, run-parts and which to a new debianutils dir.
2002-11-11 03:00:12 +00:00
Eric Andersen
f02c26f1ef
I committed the fflush in the wrong spot. I should go to bed
...
earlier so I don't screw up such easy stuff.
-Erik
2002-10-22 19:15:43 +00:00
Eric Andersen
5956028f6f
Be absurdly careful about flushing stdout.
2002-10-22 11:45:20 +00:00
Eric Andersen
e8a90fb2bc
After thinking about it, I think this patch from Matt Kraai is probably the
...
best way to go. Sysvinit does not provide a controlling tty since it doesn't
even try to open ttys for apps. We do. So we should _try_ to provide a
controlling tty if possible, but we needn't freak out if it doesn't work. This
way we won't need to use openvt or similar, we'll just have init do the Right
Thing(tm).
2002-10-12 04:05:48 +00:00
Eric Andersen
71ae64bdc6
last_patch61 from vodz:
...
New complex patch for decrease size devel version. Requires previous patch.
Also removed small problems from dutmp and tar applets.
Also includes vodz' last_patch61_2:
Last patch correcting comment for #endif and more integrated
with libbb (very reduce size if used "cat" applet also).
Requires last_patch61 for modutils/config.in.
2002-10-10 04:20:21 +00:00
Eric Andersen
6a9799020b
Set the close-on-exec flag, just to be saf
2002-09-30 20:08:53 +00:00
Eric Andersen
a920871c3a
Ignoring SIGCHLD causes a race leading to the occasional hang of init
...
when init will wait() on itself in waitfor() when the child exits before
init is scheduled to run. Letting init hang is very seriously bad.
-Erik
2002-09-25 15:08:40 +00:00
Eric Andersen
34fd00af5f
Patch from David McCullough <davidm@snapgear.com>
2002-09-17 08:40:12 +00:00
Eric Andersen
a9cc8961ed
Let people run SHUTDOWN actions prior to killing everything
...
-Erik
2002-09-16 06:49:06 +00:00
Glenn L McGrath
061c900176
mesg applet by Manuel Novoa III
2002-09-16 04:21:46 +00:00
Eric Andersen
186685d46f
Patch from Thomas Gleixner <tglx@linutronix.de> to do
...
automatic child reaping to avoid zombies
2002-09-12 15:44:53 +00:00
Eric Andersen
1130976f8e
Eliminate use of obsolete sys_errlist[]
...
-Erik
2002-08-26 21:36:32 +00:00
Glenn L McGrath
baf55a85fc
Run through indent, fix comments
2002-08-22 18:22:10 +00:00
Eric Andersen
e707806894
Kill a silly warning
2002-07-29 08:00:16 +00:00
Eric Andersen
3bc2b206b0
Patch from Tim Riker to allow tty* in inittab if the tty
...
actually exists -- serial console is not the issue...
2002-07-29 06:39:58 +00:00
Eric Andersen
0826b6b0b3
This is last_patch48 from vodz. More cleanups, kills a bit
...
of dead code, fixes one blatent bug.
2002-07-03 23:50:16 +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
599e3ce163
Apply last_patch47 from vodz to fix several problems, such as the ash "job
...
control turned off" bug, console_setup() was called with a closed file
descriptor, setsid() inconsistancy, and silly string handling bugs. I have
modified his patch to allow the askfirst init actions to have a controlling
terminal.
2002-07-03 11:08:10 +00:00
Eric Andersen
796446718d
Fix from vodz so that complex init commands actually work
2002-07-03 05:44:18 +00:00
Eric Andersen
5222d31a15
Patch from till busch <buti@gmx.at> -- unblock all signals
...
in exec_signal() before calling exec()
2002-07-03 05:15:23 +00:00
Eric Andersen
ff7661d9de
plug fd leak noticed by Russ Dill
...
-Erik
2002-06-05 07:11:32 +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
Eric Andersen
d8636cad4d
Doh! Remember to close /etc/inittab
2002-05-15 22:19:09 +00:00
Eric Andersen
1d1d2f9b18
Update some missing copyright notices
2002-04-13 08:31:59 +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
c57e42b8f0
Provide a controlling tty to askfirst processes as well
...
-Erik
2002-03-29 00:59:44 +00:00
Eric Andersen
b0cc0a6ca8
Rewind messages to avoid weird formatting, and fix a bug with
...
CONFIG_FEATURE_EXTRA_QUIET, which was broken
2002-03-20 14:57:50 +00:00
Eric Andersen
0298be88ae
Update init.c per my changes in the stable branch
...
-Erik
2002-03-05 15:12:19 +00:00
Eric Andersen
53a2299230
Patch from Russ Dill <Russ.Dill@asu.edu>. From the
...
start-stop-daemon man page:
-b|--background
Typically used with programs that don't detach on their own.
This option will force start-stop-daemon to fork before starting
the process, and force it into the background. WARNING:
start-stop-daemon cannot check the exit status if the process
fails to execute for any reason. This is a last resort, and is
only meant for programs that either make no sense forking on
their own, or where it's not feasible to add the code for it to
do this itself.
This is usefull for applets like watchdog
2002-01-26 09:04:45 +00:00
Eric Andersen
467a18b1d9
Teach 'init -q' that init's pid may not equal 1
2002-01-25 23:13:06 +00:00
Eric Andersen
038cbc7442
Oops.
2002-01-06 01:10:25 +00:00
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
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
Eric Andersen
be909b1cd5
Forgot to commit these cleanups it seems.
...
-Erik
2000-07-11 17:52:22 +00:00
Eric Andersen
9b2297a34e
Remove yet more kernel header dependancies.
...
-Erik
2000-07-10 20:08:44 +00:00
Eric Andersen
3849f9bfcc
Remove the problematic CTRLCHAR macro.
...
-Erik
2000-07-10 19:56:47 +00:00
Eric Andersen
bd22ed8067
Update files to reduce dependance on kernel version...
...
-Erik
2000-07-08 18:55:24 +00:00
Eric Andersen
4c95a28461
Fix for bug #1003 -- BusyBox should now poweroff when asked to
...
do so... Fix thanks to Matt Kraai <kraai@alumni.carnegiemellon.edu>
-Erik
2000-07-07 19:30:28 +00:00
Eric Andersen
02bc25be56
Fixed backspace and delete so they work properly again -- broken
...
since 0.44.
-Erik
2000-07-06 21:29:32 +00:00
Eric Andersen
a5dbb39dac
Change order.
...
-Erik
2000-07-06 19:11:34 +00:00
Eric Andersen
1e03add675
a few minor cleanups.
...
-Erik
2000-07-06 09:56:35 +00:00
Eric Andersen
b02c54ebee
* Fix to init.c from Stuart Menefy <Stuart.Menefy@st.com> so that
...
it always sets the controlling terminal before running any programs
-Erik
2000-07-04 19:41:23 +00:00
Eric Andersen
a44790f539
Better cross libc support.
...
-Erik
2000-06-28 20:11:28 +00:00
Eric Andersen
10dc9d4d17
Updates to handle Linux 2.4.0 kernels (kludged around the "none" entries in
...
/proc/mounts, added a hack to make sysinfo work with both old and new kernels).
-Erik
2000-06-26 10:45:52 +00:00
Eric Andersen
a15cd0be34
Make syslogd.c, init.c, and update.c compile error/warning free under both libc5 and libc6.
...
-Erik
2000-06-19 18:14:20 +00:00
Eric Andersen
b610615be9
Updates to a number of apps to remove warnings/compile errors under libc5.
...
Tested under both libc5 and libc6 and all seems well with these fixes.
-Erik
2000-06-19 17:25:40 +00:00
Eric Andersen
b5966368d7
Minor doc fix. Added several bugs to the todo list. Fixed the way init
...
scans /etc/inittab entries so that commands can contain ":"s.
-Erik
2000-05-31 20:04:38 +00:00
Erik Andersen
330fd2b576
More libc portability updates, add in the website (which has not been
...
archived previously). Wrote 'which' during the meeting today.
-Erik
2000-05-19 05:35:19 +00:00
Erik Andersen
4f3f757d56
Latest and greatest. Some effort at libc5 (aiming towards newlib)
...
compatability.
-Erik
2000-04-28 00:18:56 +00:00
Erik Andersen
1d1d95051a
More Doc updates. cmdedit and more termio fixes.
2000-04-21 01:26:49 +00:00
Erik Andersen
61677feff7
Upates to include copyright 2000 to everything
...
-Erik
2000-04-13 01:18:56 +00:00
Erik Andersen
825aead68b
Patch to make killall actually kill all PIDs with the specified name,
...
rather then busylooping trying to kill the first one until it dies.
Should be more efficient now, and will only send one signal to each
specified process.
-Erik
2000-04-07 06:00:07 +00:00
Erik Andersen
93d6513d93
Some more minor updates to better use some gcc attributes.
...
-Erik
2000-04-06 08:06:36 +00:00
Erik Andersen
183da4ade1
Minor structural change to allow core dumping(or not) from init
...
-Erik
2000-04-04 18:36:37 +00:00
Erik Andersen
983b51b17b
minor changes to mount/umount to support-by-ignoring the "-v" flag.
...
Added optional core dumping as a feature for init, and include a rewrite
of syslogd so that it now supports multiple concurrent connections.
-Erik
2000-04-04 18:14:25 +00:00
Erik Andersen
298854f029
My latest ramblings.
...
-Erik
2000-03-23 01:09:18 +00:00
Erik Andersen
42094cdad5
Fix bug in memory total checking.
...
-Erik
2000-03-20 21:34:52 +00:00
Erik Andersen
6c41c44898
Adjust the termio settings, and don't use octal since it
...
is impossible to read by mere mortals.
-Erik
2000-03-19 05:13:49 +00:00
Erik Andersen
2ac2fae728
Fix bugs related to finding PIDs.
...
-Erik
2000-03-07 23:32:17 +00:00
Erik Andersen
ea6b67de65
Add a #define to make init extra quiet on boot.
...
-Erik
2000-03-07 07:47:10 +00:00
Erik Andersen
246cc6dddd
Wrote killall.
...
Adjusted mount, ps, utility.c, etc to handle my nifty new kernel
patches the allow busybox to run perfectly without /proc.
-Erik
2000-03-07 07:41:42 +00:00
Erik Andersen
029011b9ee
A few updates (including the cp fix the Craig has been looking for)
...
-Erik
2000-03-04 21:19:32 +00:00
Erik Andersen
a51ecdd9e4
Minor tweak to argv[0] handling for linuxrc
...
-Erik
2000-02-24 18:09:58 +00:00
Erik Andersen
d07ee46919
Removed proc dependancies for init and free (which maintaining exactly
...
the same functionality). /proc takes up 90k of kernel space, so it is
nice to avoid using it at all costs. The only places where it is depended
on is for cetain optional mount/umount features, and for ps and lsmod.
-Erik
2000-02-21 21:26:32 +00:00
Erik Andersen
fa4718efcf
Minor update for handling TERM with serial consoles.
...
-Erik
2000-02-21 19:25:12 +00:00
Erik Andersen
e272915e1f
Some updates for the day,
...
-Erik
2000-02-18 21:34:17 +00:00
Erik Andersen
fb1793f03c
Fix stupid typos -- thanks to Taketoshi Sano <kgh12351@nifty.ne.jp>
...
for noticing these bugs.
-Erik
2000-02-09 16:37:08 +00:00
Erik Andersen
07f5604046
Fix a possible /linuxrc crash.
...
-Erik
2000-02-09 06:05:01 +00:00
Erik Andersen
e132f4b09e
Fixed the init problem where it wouldn't unmount filesystems
...
on reboot. Also fixed swapoff -a so it works.
-Erik
2000-02-09 04:16:43 +00:00
Erik Andersen
e49d5ecbbe
Some formatting updates (ran the code through indent)
...
-Erik
2000-02-08 19:58:47 +00:00
Erik Andersen
31cf8e0056
device_open is common code -- moved into utility.c
...
-Erik
2000-02-07 20:31:19 +00:00
Erik Andersen
fac10d7c59
A few minor updates. ;-)
...
Seriously though, read the Changelog for busybox 0.42,
which this is about to become...
-Erik
2000-02-07 05:29:42 +00:00
Erik Andersen
04e97024e7
Clear up some ambiguity with old style assignments.
...
-Erik
2000-01-29 07:06:24 +00:00
Erik Andersen
a6d0dbc86f
Minor change. init now uses dup2.
...
-Erik
2000-01-29 06:29:32 +00:00
Erik Andersen
ccc7488615
Fixed ls formatting for 8 char user names.
...
-Erik
2000-01-27 02:40:21 +00:00
Erik Andersen
5cbdd712f5
mount and umount could leak loop device allocations causing the system to
...
quickly run out. Also disable init's SIGHUP handler during shutdown.
-Erik
2000-01-26 20:06:48 +00:00
Erik Andersen
3fe39dce5d
Some busybox updates. See the changelog for details if you care.
...
-Erik
2000-01-25 18:13:53 +00:00
Erik Andersen
de552874d2
Some busybox updates. You no longer _have_ to put a "-" in front of tar
...
options, logger is better behaved and has a "-t" option now. init now supports
the kernel chroot patch, so you can chroot to a new device and umount the old
root.
-Erik
2000-01-23 01:34:05 +00:00
Erik Andersen
3163821967
Sync up busybox with the latest and greatest. This is not stuff for
...
the Embedix release.
-Erik
2000-01-15 22:28:50 +00:00
Erik Andersen
05df239ed9
Bug fixes.
...
-Erik
2000-01-13 04:43:48 +00:00
Erik Andersen
ac6e71f0c4
Possible fixes...
...
-Erik
2000-01-08 22:04:33 +00:00
Erik Andersen
5f2df6ccb4
Remove some leftover debug noise.
...
-Erik
2000-01-07 23:11:00 +00:00
Erik Andersen
812d46667d
More minor fixes.
...
-Erik
2000-01-07 18:30:40 +00:00
Erik Andersen
96e2abd084
Init is now even more perfect then before.
...
-Erik
2000-01-07 11:40:44 +00:00
Erik Andersen
0e3782f7c3
Init is now _more_ perfect then before.
...
-Erik
2000-01-07 02:54:55 +00:00
Erik Andersen
9e7372584f
inittab is now perfect. The universe will now submit to my
...
will. muhahahaha!!! Phear!
-Erik
2000-01-06 01:16:13 +00:00
Erik Andersen
0881de706e
The latest and greatest. init basically works, though needs
...
a minor inittab design change to accomodate specifying the device
to run each process on.
-Erik
2000-01-05 09:34:26 +00:00
Erik Andersen
7dc160721e
Bunches of fixes. Typos, bugs, etc.
...
Added 'gunzip -t'. inittab support _almost_ works (but it isn't
ready for prime time useage yet).
-Erik
2000-01-04 01:10:25 +00:00
Erik Andersen
9c88cac5cb
First pass inittab parser written
...
-Erik
1999-12-30 09:25:17 +00:00
Erik Andersen
f294a0288d
Fix double quoting bug preventing ininit scripts from running
1999-12-21 02:54:37 +00:00
Erik Andersen
4d1d0113fd
Reworked the source so it will compile and run under glibc 2.0.7
...
and linux kernel 2.0.36 (though the dubious reasons why someone
would want to do that defy imagination ;)
-Erik
1999-12-17 18:44:15 +00:00
Eric Andersen
84b009256f
Minor updates
1999-12-11 04:16:51 +00:00
Eric Andersen
2cb55077e2
Added poweroff (and adjusted init to use it). Inlined function
...
calls to code only called once in tee. Made BB_KLOGD and option.
-Erik
1999-12-10 08:25:07 +00:00
Eric Andersen
6805d5d69e
Adjustments for Johns init stuff,
...
-Erik
1999-12-09 22:39:55 +00:00
John Beppu
f95ca97d1b
findInitPid() has been implemented and it seems to work.
...
reboot has been changed to take advantage of findInitPid();
1999-12-09 22:10:18 +00:00
Eric Andersen
f0758dd6ba
* Fixed rebooting from init. I'd left some debugging code in
...
which blocked reboots. Oops.
-Erik
1999-12-09 07:57:58 +00:00
Eric Andersen
485b9550fd
Stuf
1999-12-07 23:14:59 +00:00
Eric Andersen
d00c262847
Stuf
1999-12-07 08:37:31 +00:00
Eric Andersen
0ecb54a0f3
Stuf
1999-12-05 23:24:55 +00:00
Eric Andersen
b186d980d6
Stuf
1999-12-03 09:19:54 +00:00
Eric Andersen
4c78147755
Changes
1999-11-26 08:12:56 +00:00
Eric Andersen
0727458a97
Stuf
1999-11-21 21:50:07 +00:00
Eric Andersen
08b1034f4f
Stuf
1999-11-19 02:38:58 +00:00
Eric Andersen
ded6259f62
Latest and greatest
1999-11-18 00:19:26 +00:00
Eric Andersen
d80e851dc0
Stuf
1999-11-16 00:46:00 +00:00
Eric Andersen
a9c95ea655
Updates
1999-11-15 17:33:30 +00:00
Eric Andersen
b6a44b8d39
updates for the day
1999-11-13 04:47:09 +00:00
Eric Andersen
d73dc5b073
Updates to usage, and made tar work.
...
-Erik
1999-11-10 23:13:02 +00:00
Eric Andersen
fbb39c83b6
Stuff
...
-Erik
1999-11-08 17:00:52 +00:00
Eric Andersen
07e5297ca7
init and ls -l fixes
1999-11-07 07:38:08 +00:00
Eric Andersen
e18c75a563
Fixed init so it won't hang on reboot...
1999-11-05 04:23:05 +00:00
Eric Andersen
cf8c9cf7b9
More stuff -- ready for release.
...
-Erik
1999-11-05 00:31:46 +00:00
Eric Andersen
3ae0c78962
Stuf
1999-11-04 01:13:21 +00:00
Eric Andersen
be971d6b69
More init fixes. Fixed sync segfault.
...
-Erik
1999-11-03 16:52:50 +00:00
Eric Andersen
219d6f5e0c
Stuf
1999-11-02 19:43:01 +00:00
Eric Andersen
2f6c04f63c
Ha! Got init working.
...
-Erik
1999-11-01 23:59:44 +00:00
Eric Andersen
04579780b7
Fixed it.
1999-10-29 23:12:50 +00:00
Eric Andersen
7f1acfdb89
More stuf. sed works.
1999-10-29 23:09:13 +00:00
Eric Andersen
c1525e84dd
Stuff
1999-10-29 00:07:31 +00:00
Eric Andersen
c7c41d306b
Cleanup of init
1999-10-28 00:24:35 +00:00
Eric Andersen
a745606df3
Stuf
1999-10-27 02:31:32 +00:00
Eric Andersen
8a8fbb87f7
Foo
1999-10-26 00:18:56 +00:00
Eric Andersen
0460ff2e5d
Stuf
1999-10-25 23:32:44 +00:00
Eric Andersen
c49960189a
Fixed up copyright notices and such
1999-10-20 22:08:37 +00:00
Eric Andersen
d23f9ba0f6
Made ps work. Fixed some stuff.
1999-10-20 19:18:15 +00:00
Eric Andersen
e77ae3a2c0
Added sfdisk. Ststic-ified a bunch of stuff.
1999-10-19 20:03:34 +00:00
Eric Andersen
abc7d597cb
More stuff
1999-10-19 00:27:50 +00:00
Eric Andersen
703c62da63
More stuff
1999-10-18 21:31:00 +00:00
Eric Andersen
cb6e25655f
More stuff
1999-10-16 15:48:40 +00:00
Eric Andersen
3c163822d8
Fixed cp -[aR] and some other stuf.
1999-10-14 22:16:57 +00:00
Eric Andersen
2c1030177e
More stuff
1999-10-13 22:56:11 +00:00
Eric Andersen
3cf52d1958
More stuff...
1999-10-12 22:26:06 +00:00
Eric Andersen
cc8ed39b24
Initial revision
1999-10-05 16:24:54 +00:00