aboutsummaryrefslogtreecommitdiff
path: root/libbb (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-10-22Allow shell scripts to be embedded in the binaryRon Yorston6-1/+218
To assist in the deployment of shell scripts it may be convenient to embed them in the BusyBox binary. This patch adds two configuration options to the shell: - 'Embed scripts in the binary' takes any files in the directory 'embed', concatenates them with null separators, compresses them and embeds them in the binary. - 'Allow the contents of embedded scripts to be listed' makes the shell argument '-L name' list the contents of the named script. Both options are off by default. When scripts are embedded in the binary: - The shell argument '-L' lists the names of the scripts. - Scripts can be run as 'sh name arg...'. - An alias is added for each script, equivalent to "alias name='sh name'".
2018-09-30unzip: use printable_string() for printing filenamesDenys Vlasenko7-27/+50
function old new delta unzip_main 2726 2792 +66 printable_string2 - 57 +57 identify 4329 4336 +7 expmeta 659 663 +4 add_interface 99 103 +4 beep_main 286 289 +3 changepath 192 194 +2 builtin_type 115 117 +2 devmem_main 469 470 +1 input_tab 1076 1074 -2 create_J 1821 1819 -2 poplocalvars 314 311 -3 doCommands 2222 2214 -8 do_load 918 902 -16 printable_string 57 9 -48 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 8/6 up/down: 146/-79) Total: 67 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-30ifupdown: support "source-directory" stanzaBrandon Maier1-0/+16
Support the "source-directory" stanza from ifupdown[1]. source-directory will include all files in the named directory. Similar to the Busybox version of the "source" stanza, this version of source-directory does not currently support shell wildcards. We only check that the stanza starts with "source-dir" as ifupdown does[2]. [1] https://manpages.debian.org/stretch/ifupdown/interfaces.5.en.html#INCLUDING_OTHER_FILES [2] https://salsa.debian.org/debian/ifupdown/blob/0.8.33/config.c#L498 function old new delta read_interfaces 1150 1241 +91 Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-28move storage helpers to libbb.hDenys Vlasenko5-63/+17
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-28udhcpc: give SIGUSR1-induced renew one chance of unicast renewDenys Vlasenko2-10/+6
The caps were inconsistent: timeout to renew was capped at 20 seconds, and any renews with timeout <= 60 seconds were forced to broadcast. function old new delta udhcpc_main 2683 2680 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-26.gitignore: add ctags output filesMartin Kaiser1-0/+6
Exuberant ctags creates an output file called "tags" by default or "TAGS" when it's run in emacs mode. Add those two files to .gitignore so they won't be removed by git clean -df. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-25mdev.txt: explain the meaning of a leading "-"Martin Kaiser1-3/+3
If a line in mdev.conf starts with "-", parsing will continue even if a match is found in that line. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-25sed: fix double-free in FEATURE_CLEAN_UP codeDenys Vlasenko1-12/+17
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-23date: do not allow "month #20" and such, closes 11356Denys Vlasenko1-0/+14
function old new delta parse_datestr 906 961 +55 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-22head: convert existing tests to new-styleThomas De Schampheleire3-8/+10
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>