ash,hush: improve randomness of $RANDOM, add easy-ish way to test it

function                                             old     new   delta
next_random                                           68     113     +45
change_random                                        103     121     +18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
random: cosmetic tweaks in debug code

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
hush: make "true" built-in

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ash,hush: fix a thinko about 2^64-1 factorization

function                                             old     new   delta
next_random                                          113     119      +6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
su: add a delay if the password is incorrect

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
build system: for "find", use POSIX not operator (!) instead of -not

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
script: make it work even if fd 0 is closed

Testcase:
script -q -c "echo hey" /dev/null 0>&-

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ash: make "locak VAR" unset VAR (bash does that)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
docs: update new-applet-HOWTO.txt

This patch adds some information about the gen_build_files.sh script and how
it allows to keep the Kbuild, Config.in etc. declarations in .c files.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb: fix a bad check for uclibc >= 0.9.31

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
docs/new-applet-HOWTO.txt: tweak a bit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
ntpd: add optional support for /etc/ntp.conf

function                                             old     new   delta
add_peers                                              -      98     +98
packed_usage                                       29470   29511     +41
ntp_init                                             407     428     +21
pw_encrypt                                            14      27     +13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 173/0)             Total: 173 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
avoid calling bb_strtou twice in MIN macro expansion

Also, the maximum allowable value of swap priority is technically SWAP_FLAG_PRIO_MASK >> SWAP_FLAG_PRIO_SHIFT.

Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
fix interaction of -a and -p options in swapon

Swap entries in /etc/fstab inherit the priority specified on the command line unless they have 'pri' in their mount options.

Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
add discard option -d to swapon

Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>