Denys Vlasenko
43b8a1cc38
crond: implement "SHELL=prog" in crontab. Export LOGNAME as POSIX wants
...
function old new delta
fork_job 343 456 +113
load_crontab 688 777 +89
crond_main 1456 1434 -22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 202/-22) Total: 180 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-04-30 17:38:27 +02:00
Denys Vlasenko
d5929d602e
crond: simplify logging code
...
Slight change in behavior: now -l 5 will enable the same messages
formerly only enabled for -d 5. (Old behavior was non-sensical).
function old new delta
reopen_logfile_to_stderr - 34 +34
log8 - 26 +26
log7 - 26 +26
log5 - 26 +26
load_crontab 706 688 -18
rescan_crontab_dir 157 137 -20
crond_main 1486 1456 -30
fork_job 389 343 -46
crondlog 108 38 -70
------------------------------------------------------------------------------
(add/remove: 4/0 grow/shrink: 0/5 up/down: 112/-184) Total: -72 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-04-30 14:49:52 +02:00
Denys Vlasenko
3dfe0ae5a8
libbb: make syslog level for bb_error_msg's configurable. use it in crond
...
function old new delta
bb_verror_msg 380 386 +6
syslog_level - 1 +1
crondlog 165 108 -57
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-04-30 14:48:28 +02:00
Denys Vlasenko
01a1a967c9
crond: tweak help text, make course less cryptic
...
function old new delta
packed_usage 29736 29740 +4
crond_main 1485 1486 +1
load_crontab 712 706 -6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-04-30 14:47:28 +02:00
Anthony G. Basile
12677acf0a
CONFIG_PID_FILE_PATH: new configuration option for pidfile paths
...
We set a default path for the directory where pidfiles are create
when FEATURE_PIDFILE is selected. The default has no effect on
applets which must specify a pidfile path on the command line to
run, and it can be overridden by applets which optionally allow
the user to specify the pidfile path.
We also add pidfile write/remove support for klogd, ntpd and watchdog.
For syslogd, we add a missing remove_pidfile() for better cleanup
on daemon exit.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-19 15:53:33 -05:00
Denys Vlasenko
8c84f7545c
crond: fix the case when option -d is disabled
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-07 05:56:09 +02:00
Pere Orga
5bc8c005a8
move remaining help text from include/usage.src.h
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Denys Vlasenko
e4dcba1c10
*: whitespace fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Denys Vlasenko
bec588878b
*: s/open3_or_warn/open_or_warn/ where makes sense
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-20 13:21:22 +02:00
Denys Vlasenko
0ef64bdb40
*: make GNU licensing statement forms more regular
...
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-08-16 20:14:46 +02:00
Denys Vlasenko
f3ea792bad
*: mass cosmetic removal of extra empty lines. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:06:14 +02:00
Denys Vlasenko
69d69e2cb8
crond: mention other cronds' behavior in comment. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-11 23:20:15 +02:00
Denys Vlasenko
1f0ab1dc64
crond: code shrink
...
function old new delta
crond_main 1431 1472 +41
fork_job 457 389 -68
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-08 16:12:10 +02:00
Denys Vlasenko
45963c873c
crond: rename HumpBack names. Note two TODOs/FIXMEs
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-08 15:37:10 +02:00
Denys Vlasenko
dfc870fab7
crond: check mtime on crontab dir every minute, and reread if changed
...
function old new delta
crond_main 1417 1460 +43
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-08 04:07:54 +02:00
Denys Vlasenko
4a09aefae2
crond: reorder functions to follow usual order: "main last"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-08 04:07:15 +02:00
Denys Vlasenko
d3c2b71ffa
crond: code shrink
...
function old new delta
ForkJob 513 457 -56
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-06 18:47:00 +02:00
Denys Vlasenko
dd8adde386
*: introduce and use bb_unsetenv_and_free
...
function old new delta
bb_unsetenv_and_free - 17 +17
tcpudpsvd_main 1819 1810 -9
safe_setenv 58 47 -11
udhcp_run_script 630 616 -14
make_device 1683 1663 -20
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/4 up/down: 17/-54) Total: -37 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-24 05:00:50 +02:00
Denys Vlasenko
19ced5c425
pipe_progress: make it independent of printf machinery
...
function old new delta
bb_putchar_stderr - 24 +24
ParseField 494 471 -23
progress_meter 212 188 -24
xargs_main 888 842 -46
pipe_progress_main 151 105 -46
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/4 up/down: 24/-139) Total: -115 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 21:53:09 +02:00
Bernhard Reutner-Fischer
ca228fb16d
reuse a few strings
...
text data bss dec hex filename
839040 453 6828 846321 ce9f1 busybox_old
839019 453 6828 846300 ce9dc busybox_unstripped
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26 10:09:31 +01:00
Denys Vlasenko
98a4c7cf3d
*: suppress ~60% of "aliased warnings" on gcc-4.4.1
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 15:00:15 +01:00
Denys Vlasenko
dc698bb038
*: make it easier to distinquish "struct tm", pointer to one, etc
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 19:10:49 +01:00
Denys Vlasenko
78fcec4dc7
crond: do not log info messages at LOG_ERR. Closes bug 681. +62 bytes.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-13 17:42:49 +01:00
Denys Vlasenko
6331cf059c
*: use "can't" instead of "cannot"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Vladimir Dronnikov
b618dba103
sendmail: accept -i too, not only -oi
...
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-04 01:34:54 +02:00
Denys Vlasenko
1f27ab0d4b
*: optimize code size in strtoul calls
...
function old new delta
bb_parse_mode 433 431 -2
rtnl_rtntype_a2n 202 198 -4
ParseField 511 498 -13
bb_init_module_24 4730 4675 -55
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-74) Total: -74 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 17:17:53 +02:00
Denis Vlasenko
5e34ff29bc
*: mass renaming of USE_XXXX to IF_XXXX
...
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
551ffdccea
more of pointless whitespace fixes
2009-04-01 19:48:05 +00:00
Denis Vlasenko
a19e64933c
docs/logging_and_backgrounding.txt: new mini-doc
...
dnsd: remove statics, remove nerly-useless SIGINT handler
crond: correct more of logfile to 0666 (as usual, umask allows
user to remove unwanted bits).
nameif: print errors to stderr too, not just to syslog
function old new delta
udhcp_read_interface 308 306 -2
ttl 4 - -4
fileconf 4 - -4
dnsentry 4 - -4
interrupt 19 - -19
dnsd_main 1463 1394 -69
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/2 up/down: 0/-102) Total: -102 bytes
text data bss dec hex filename
808161 476 7864 816501 c7575 busybox_old
807994 468 7856 816318 c74be busybox_unstripped
2009-03-11 14:40:00 +00:00
Denis Vlasenko
f09f4e015b
runsv: small optimization
...
*: more paranoia around passing NULL to execl[e]
function old new delta
custom 240 221 -19
2009-02-26 12:29:59 +00:00
Denis Vlasenko
ded5dfef6e
crond,crontab: make cron directory location configurable
2009-02-03 23:59:41 +00:00
Denis Vlasenko
76ddc2e3e4
libbb: add bb_unsetenv (taken from hush).
...
udhcpc: stop filtering environment passed to the script.
crond: fix uncovered potential bug (failing unsetenv)
mdev: fix uncovered potential bug (failing unsetenv)
tcp, udpsvd: fix uncovered potential bug (failing unsetenv)
function old new delta
safe_setenv - 58 +58
bb_unsetenv - 55 +55
builtin_unset 139 138 -1
tcpudpsvd_main 1843 1830 -13
free_strings_and_unsetenv 87 53 -34
udhcp_run_script 1186 1133 -53
safe_setenv4 62 - -62
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/4 up/down: 113/-163) Total: -50 bytes
2008-12-30 05:05:31 +00:00
Denis Vlasenko
3f70b87c59
clarify which version of crond is known to put tasks in separate pgrps
2008-12-04 13:57:59 +00:00
Denis Vlasenko
6ebb2f56d5
crond: use bb_setpgrp, not setpgrp
...
platform.h: make a bit more readable
2008-12-03 10:46:12 +00:00
Denis Vlasenko
b6ddee2425
crond: put tasks in separate process groups
2008-12-02 21:52:24 +00:00
Denis Vlasenko
35a064b67f
build system: tidying up CONFIG_xxx names (suggested by Rob)
2008-11-06 00:49:59 +00:00
Denis Vlasenko
b8d1a4cd5f
init: set stderr to NONBLOCK
...
*: s/setenv(a,b,1)/xsetenv(a,b)/
function old new delta
init_main 856 895 +39
message 146 144 -2
crond_main 1418 1416 -2
run 661 658 -3
zcip_main 1409 1403 -6
edit_file 910 901 -9
environment 20 - -20
2008-09-20 16:28:59 +00:00
Denis Vlasenko
084266ed52
fix several problems with config parser:
...
a bug where it underflows the string
a bug where it never frees parser_t struct
make read_config() return 0 if parser is NULL,
make config_close() accept and ignore NULL parser -
eliminates many if() blocks
reverse the sense of parser bit flags - negative flags
are harder to grok.
hexdump: revert the change to use config parser, it is BIGGER
and also requires additional quirks in parser
*: explicitly use PARSER_NORMAL instead of 0
function old new delta
login_main 1575 1596 +21
config_close 18 29 +11
bbunpack 383 391 +8
qgravechar 106 109 +3
rtnl_tab_initialize 121 117 -4
expand 1697 1693 -4
man_main 717 712 -5
nameif_main 674 668 -6
hexdump_main 597 591 -6
read_config 217 209 -8
dnsd_main 1478 1470 -8
sysctl_main 203 189 -14
config_open2 44 25 -19
make_device 1177 1141 -36
config_read 597 549 -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158) Total: -115 bytes
2008-07-26 23:08:31 +00:00
Denis Vlasenko
5415c856ea
libbb: [x]fopen_for_{read,write} introduced and used.
...
(by Valdimir)
function old new delta
config_open2 - 41 +41
config_read 507 542 +35
find_pair 169 187 +18
fopen_for_write - 14 +14
fopen_for_read - 14 +14
find_main 406 418 +12
xfopen_for_write - 10 +10
xfopen_for_read - 10 +10
popstring 134 140 +6
parse_inittab 396 401 +5
next_token 923 928 +5
pack_gzip 1659 1661 +2
bb__parsespent 117 119 +2
fallbackSort 1719 1717 -2
evalvar 1376 1374 -2
qrealloc 36 33 -3
...
...
...
...
singlemount 4579 4569 -10
process_stdin 443 433 -10
patch_main 1111 1101 -10
ifupdown_main 2175 2165 -10
file_action_grep 90 80 -10
uuidcache_init 649 637 -12
hush_main 797 785 -12
read_config 230 217 -13
dpkg_main 3835 3820 -15
read_line_input 3134 3110 -24
sysctl_main 232 203 -29
config_open 40 10 -30
WARN_BAD_LINE 44 - -44
login_main 1714 1575 -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
2008-07-21 23:05:26 +00:00
Denis Vlasenko
dcb3fcb042
libbb: config_read() update
2008-07-19 22:57:00 +00:00
Denis Vlasenko
2e157ddf9e
libbb: updated config_parse() from Vladimir
...
function old new delta
config_read 385 460 +75
runsvdir_main 1701 1716 +15
readit 331 338 +7
passwd_main 1049 1053 +4
parse_command 1504 1507 +3
decode_format_string 822 824 +2
bb__parsespent 117 119 +2
udhcp_get_option 221 222 +1
changepath 196 194 -2
parse_inittab 400 396 -4
nameif_main 683 679 -4
make_device 1176 1172 -4
config_open 48 40 -8
expand_main 698 689 -9
readcmd 1012 1002 -10
config_free_data 37 21 -16
SynchronizeFile 683 643 -40
sleep_main 474 362 -112
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/10 up/down: 109/-209) Total: -100 bytes
2008-07-19 09:27:19 +00:00
Bernhard Reutner-Fischer
679212836a
- fix segfault in nameif with mactab file
...
(by fixing and shrink config parser)
function old new delta
config_free_data - 37 +37
config_open 43 48 +5
pack_gzip 1658 1660 +2
nameif_main 527 525 -2
SynchronizeFile 629 623 -6
make_device 1184 1176 -8
config_close 31 18 -13
config_read 431 393 -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/5 up/down: 44/-67) Total: -23 bytes
2008-07-17 11:59:13 +00:00
Denis Vlasenko
fb1642f2ca
fix up callsites of config_read to check for >= 0
2008-07-16 23:04:49 +00:00
Denis Vlasenko
c01340fe26
update of config file parser from Vladimir
2008-07-16 22:12:18 +00:00
Denis Vlasenko
a60f84ebf0
*: rename ATTRIBUTE_XXX to just XXX.
2008-07-05 09:18:54 +00:00
Denis Vlasenko
0a65692048
crond: use execlp instead of execl
2008-06-30 15:48:34 +00:00
Denis Vlasenko
c94d3564c2
sendmail: from Vladimir:
...
Here comes the third part of compatibility patch for sendmail.
* Introduced new safe_getdomainname() -- will it be useful?
* Fixed SEGV if sender address is missed. Should snoop for sender address in mail headers?
* More compat: use HOSTNAME instead of HOST when no server is explicitly specified.
* crond: fixed mail recipient address.
function old new delta
safe_getdomainname - 56 +56
sendgetmail_main 1937 1946 +9
grep_file 846 850 +4
crond_main 1423 1425 +2
xstrtoull_range_sfx 295 296 +1
utoa_to_buf 110 108 -2
passwd_main 1053 1049 -4
sv_main 1234 1228 -6
parse_expr 841 833 -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/4 up/down: 72/-20) Total: 52 bytes
2008-06-30 13:30:21 +00:00
Denis Vlasenko
6ea75e2f5d
sendmail: another update from the maintainer
...
function old new delta
sendgetmail_main 1894 1937 +43
crond_main 1416 1423 +7
packed_usage 24540 24470 -70
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 50/-70) Total: -20 bytes
2008-06-28 21:46:41 +00:00
Bernhard Reutner-Fischer
636a1f85e8
- use EXIT_{SUCCESS,FAILURE}. No object-code changes
2008-05-19 09:29:47 +00:00
Denis Vlasenko
6b06cb80be
more of -Wall fixes from Cristian Ionescu-Idbohrn.
...
Some are fixing real bugs.
function old new delta
syslogd_main 938 958 +20
get_signum 136 143 +7
obj_load 777 782 +5
recv_from_to 210 214 +4
get_next_block 1795 1799 +4
display_topmem_process_list 1117 1121 +4
logread_main 484 487 +3
buffer_fill_and_print 73 76 +3
kill_main 687 689 +2
ll_remember_index 240 241 +1
do_stats 452 453 +1
if_readconf 166 165 -1
display_process_list 1192 1191 -1
run_applet_and_exit 507 505 -2
print_signames 33 31 -2
parse_one_line 1092 1090 -2
find_out_spec 57 55 -2
add_ksymoops_symbols 421 419 -2
ash_main 1407 1402 -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17) Total: 37 bytes
2008-05-15 21:30:45 +00:00