Don't use the -quit option to Busybox find

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2018-01-18 11:34:46 -08:00
parent 0e4c1cdac1
commit 422d0b216a
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -384,9 +384,24 @@ uptodate() {
[ -x $1 ] || return 1
local dir
local busybox
local find
find=$(mywhich find)
[ -n "$find" ] || return 1
[ -h "${find}" ] && busybox=Yes
for dir in $g_shorewalldir $(split $CONFIG_PATH); do
if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then
if [ -n "${busybox}" ]; then
#
# Busybox 'find' doesn't support -quit.
#
if [ -n "$(${find} ${dir} -maxdepth 1 -type f -newer $1 -print)" ]; then
return 1;
fi
elif [ -n "$(${find} ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then
return 1;
fi
done