mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 12:10:53 +03:00
install_bin: survive if find is absent but busybox has it
This commit is contained in:
parent
da3eedb443
commit
acb07c9792
@ -25,7 +25,11 @@ check_dir()
|
|||||||
# find does not use its own shell exec
|
# find does not use its own shell exec
|
||||||
# it uses execvp(). in musl libc it does not call shell, in glibc it DOES call /bin/sh
|
# it uses execvp(). in musl libc it does not call shell, in glibc it DOES call /bin/sh
|
||||||
# that's why prefer bash or zsh if present. otherwise it's our last chance
|
# that's why prefer bash or zsh if present. otherwise it's our last chance
|
||||||
out=$(echo 0.0.0.0 | find "$dir" -maxdepth 1 -name ip2net -exec {} \; 2>/dev/null)
|
local FIND=find
|
||||||
|
if ! exists find && exists busybox; then
|
||||||
|
FIND="busybox find"
|
||||||
|
fi
|
||||||
|
out=$(echo 0.0.0.0 | $FIND "$dir" -maxdepth 1 -name ip2net -exec {} \; 2>/dev/null)
|
||||||
fi
|
fi
|
||||||
[ -n "$out" ]
|
[ -n "$out" ]
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user