Use split() in uptodate()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-12-31 15:33:31 -08:00
parent e0a757ea03
commit 09980cc75e
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -380,28 +380,13 @@ uptodate() {
[ -x $1 ] || return 1
local dir
local ifs
if [ -n "$g_shorewalldir" ]; then
for dir in $g_shorewalldir $(split $CONFIG_PATH); do
if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then
return 1;
fi
fi
ifs="$IFS"
IFS=':'
for dir in $CONFIG_PATH; do
if [ -n "$dir" ]; then
if [ -n "$(find ${dir} -maxdepth 1 -type f -newer $1 -print -quit)" ]; then
IFS="$ifs"
return 1;
fi
fi
done
IFS="$ifs"
return 0
}