"-c, --no-canonicalize: Do not canonicalize paths."
As busybox doesn't canonicalize paths in the first place it is safe to ignore
this option.
See https://github.com/systemd/systemd/issues/7786
Signed-off-by: Shawn Landden <slandden@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
If the numeric argument passed to ash's 'shift' built-in is greater than
'$#' the command performs no operation and exits successfully. It should
return a non-zero exit code instead:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#shift
This is consistent with bash and hush.
function old new delta
shiftcmd 122 120 -2
Signed-off-by: Ingo van Lil <inguin@gmx.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Currently, it is impossible to pass more than one option to the isntall
script, so it totally prevents using --noclobber.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Simplify the handling of --noclobber so that it applies to all types of
installation types, even to script wrappers.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
The -u option is supposed to be allowed to appear multiple times; the
option string supplied to getopt32long requires it to be followed by a
nonnegative integer.
Reported-by: Keith Maxwell <keith.maxwell@gmail.com>
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Original Info-ZIP's unzip uses unstripped filenames
while doing content listing and filtering, i.e.
- in content listing mode -j is ignored completely
- filtering is applied to non-stripped names, -j
takes effect first while extracting the files
997ad2c64a strips path
components a little bit too early resulting in behavior
deviations.
Fix it by doing stripping after listing/filtering.
p.s. Info-ZIP's unzip behavior is the same as
that of tar in --strip-components=NUM mode
Signed-off-by: Eugene Rudoy <gene.devel@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
When grep is passed -r, recursive_action will treat any symlinks to
directories not in the root as normal files, since it lstat's them and
is therefore told they are not directories. However, file_action_grep
will still try to fopen and read from them to see whether they match,
which varies in behaviour across platforms. Linux will give EISDIR and
thus grep will not find any matching lines, but FreeBSD will give the
raw contents of the directory itself, which may match the given pattern.
Also, if grep is passed -c, it will even print a count for these
symlinks, even on Linux.
Since this recursive_action behaviour is required for the correct
functioning of other applets, such as tar, grep should handle this
special case and skip any such symlinks.
function old new delta
file_action_grep 80 161 +81
Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
The current standard (RFC 3542) is for IPV6_RECVPKTINFO to be given to
setsockopt, and IPV6_PKTINFO to be used as the packet type. Previously,
RFC 2292 required IPV6_PKTINFO to be used for both, but RFC 3542
re-purposed IPV6_PKTINFO when given to setsockopt. The special
Linux-specific IPV6_2292PKTINFO has the same semantics as IPV6_PKTINFO
in RFC 2292, but was introduced at the same time as IPV6_RECVPKTINFO.
Therefore, if we have IPV6_RECVPKTINFO available, we can use the RFC
3542 style, and if not, we assume that only the RFC 2292 API is
available, using IPV6_PKTINFO for both.
Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Platforms differ on what their implementations of statfs include.
Importantly, FreeBSD's does not include a f_frsize member inside struct
statfs. However, statvfs is specified by POSIX and includes everything
we need, so we can just use that instead.
Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Bad case: send request to server1good.com; then try to resolve server2bad.com -
this fails, and failure takes ~5 secs; then receive server1's
response 5 seconds later. We'll never sync up in this case...
function old new delta
ntpd_main 1079 1106 +27
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
iproute.c: In function 'print_route':
iproute.c:85:9: error: 'RTA_TABLE' undeclared (first use in this function)
iproute.c:85:9: note: each undeclared identifier is reported only once for each function it appears in
iproute.c: In function 'iproute_modify':
iproute.c:467:36: error: 'RTA_TABLE' undeclared (first use in this function)
Fix it by partially #ifdef'ing the code added in b42107f215
Signed-off-by: Eugene Rudoy <gene.devel@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>