summaryrefslogtreecommitdiff
path: root/init/init.c
AgeCommit message (Collapse)Author
2014-01-30init: do not fail build if SIGPWR is not definedMichael Tokarev
Apparently, some *BSD variants (and maybe some other OSes) does not define SIGPWR signal. So since commit 760fc6debcba8c, busybox fails to build on such platforms. Fix this. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-26init: halt on SIGPWR tooBogdan Purcareata
Most init processes implement a handler for SIGPWR that gracefully stops all child processes when shutting down a machine. Some other technologies rely on this signal - e.g. Busybox powered LXC containers. This patch makes busybox init halt when receiving SIGPWR. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-19libbb: move nuke_str() from passwd into libbbDenys Vlasenko
function old new delta nuke_str - 15 +15 ask_and_check_password_extended 215 206 -9 init_main 781 771 -10 nuke_str 27 - -27 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 15/-46) Total: -31 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-03init: fix illegal memory access when max message length is reachedYuan-Hsiang Lee
Signed-off-by: Yuan-Hsiang Lee <yhlee@ubnt.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-12init: better --help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-08-16init: don't srop unterminated processes' entries during inittab reloadPaulius Zaleckas
This feature was removed in 72c99af It is useful when process is removed from inittab and later added back, but never terminated. It prevents init from spawning duplicate. function old new delta check_delayed_sigs 176 182 +6 Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-08-16init: don't use fixed size buffer for commandDenys Vlasenko
We store init actions forever. 256 bytes per action means that a typical inittab of ~10 commands uses 2.5k just to remember command strings - which are usually _much_ shorter than 256 bytes. At a cost of a bit more code, it's possible to allocate only actually needed amount. function old new delta init_exec 224 248 +24 new_init_action 140 142 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-21init: remove special-case code for machines with less tham 1 MB of RAM.Denys Vlasenko
function old new delta init_main 920 781 -139 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29examples/inittab: fix a few incorrect statements about initDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14whitespace cleanup. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-30init: add a segv debugging aid, disabled by defaultDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-05init: code shrink -4 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-05init: utmp update of DEAD_PROCESS was misplaced, and could be skipped. Fixing.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-26*: work around sysinfo.h versus linux/*.h problemsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-21init: fix a case where execv's 1st arg was wrongDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25move utmp.h include to libbb.hDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-25init: simpler handling of leading dash in commandsDenys Vlasenko
function old new delta init_exec 233 219 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-02init: if PID!=1, show clearer error message. move usage text closer to main()Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-25init: do not sleep forever on usage errorsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24init: do not clear CRTSCTS (fix from Debian bug 528560)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-12init/*: move applet/kbuild/config/help bits into applet source filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19init: make the initial $TERM value configurableJeremie Koenig
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19init,halt: portability improvementsJeremie Koenig
* make init and halt use the same RB_* constants for reboot() * conditionalize the Linux-specific code Inspired by init.init.diff from the Debian kFreeBSD patches at: http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19init,loginutils: termios portability fixesJeremie Koenig
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06libbb: add skip_dev_pfx()Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06init: clear utmp entries for dead processes, if they (entries) existDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-15init: fix logically inverted FEATURE_EXTRA_QUIET checkDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-14init: use applet_name instead of "init" - we can be linuxrcDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-14init: for paranoid reasons, restore SIGCONT too.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-14init: fix "while true; do reboot; done" bug. +15 bytes. Closes bug 781Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-14init: make FEATURE_EXTRA_QUIET more consistent. +1 byteDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15init: restore possibility to reload inittab even before we finish initializationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13*: use "can't" instead of "cannot"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06remove some GNUisms. by Dan Fandrich (dan AT coneharvesters.com)Denys Vlasenko
function old new delta logdirs_reopen 1310 1308 -2 read_line_input 4757 4753 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-6) Total: -6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19init: make comment more understandable. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-03-19init: test for vt terminal with VT_OPENQRY,Denis Vlasenko
assume that anything else is TERM=vt102, not TERM=linux. (Serial console test is less correct) Tentatively closes bug 195. function old new delta init_main 946 919 -27
2009-03-10mail.c: more robust handling of SIGCHLDDenis Vlasenko
init: more robust signal handling
2009-02-14init: fix compile breakage with '# CONFIG_FEATURE_KILL_REMOVED is not set'Denis Vlasenko
runsvdir.c: fix typo in comment
2009-01-31init: remove wait() loop on restart, it may be dangerousDenis Vlasenko
2009-01-31init: fix a bug where on reload order of entries might be wrongDenis Vlasenko
function old new delta run_shutdown_and_kill_processes - 97 +97 pause_and_low_level_reboot - 48 +48 run_actions 81 107 +26 restart_handler 56 81 +25 new_init_action 137 150 +13 run 576 579 +3 open_stdio_to_tty 110 98 -12 check_delayed_sigs 195 170 -25 waitfor 354 318 -36 low_level_reboot 53 - -53 kill_all_processes 115 - -115 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 4/3 up/down: 212/-241) Total: -29 bytes
2009-01-31modutils-24: use xasprintf and xzalloc where appropriate,Denis Vlasenko
remove unreachanble code build system: correct some dependencies in config system init: convert one #if into if() - for Rob. function old new delta obj_string_patch 136 129 -7 bb_init_module_24 4759 4615 -144 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-151) Total: -151 bytes
2009-01-31init: small correction in a commentDenis Vlasenko
2009-01-31init: major improvement in documentation and signal handling.Denis Vlasenko
Lots of nasty, but hard to trip, races are fixed. text data bss dec hex filename 1038828 924 10932 1050684 10083c busybox_old 1038787 924 10932 1050643 100813 busybox_unstripped
2009-01-31init: preparatory patch, no code changesDenis Vlasenko
2009-01-29init: reinstate proper handling of !ENABLE_FEATURE_USE_INITTABDenis Vlasenko
2009-01-28init: reduce ifdef forest (specially for Rob's happiness)Denis Vlasenko
2008-12-09init: do not eat last char in messages;Denis Vlasenko
do not print duplicate "init:" prefix to syslog
2008-11-29init: O_NONBLOCK needs more thought. reverted for nowDenis Vlasenko