From 9fb2ab718c4dcd9569efa4313780ddc0bd4172aa Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 7 Jun 2011 08:51:36 -0700 Subject: [PATCH] Have AUTOMAKE follow CONFIG_PATH Signed-off-by: Tom Eastep --- Shorewall/shorewall | 19 ++++++++++++++++++- Shorewall6/shorewall6 | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Shorewall/shorewall b/Shorewall/shorewall index db3fe8faa..07d34bcc0 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -330,7 +330,24 @@ startup_error() { # Determine if there are config files newer than the passed object # uptodate() { - [ -f $1 ] && [ -z "$(find ${CONFDIR} -newer $1)" ] + [ -f $1 ] || return 1 + + local dir + local ifs + + ifs="$IFS" + IFS=':' + + for dir in $CONFIG_PATH; do + if [ -n "$(find ${dir} -newer $1)" ]; then + IFS="$ifs" + return 1; + fi + done + + IFS="$ifs" + + return 0 } # diff --git a/Shorewall6/shorewall6 b/Shorewall6/shorewall6 index ad1624bf5..f71f4f439 100755 --- a/Shorewall6/shorewall6 +++ b/Shorewall6/shorewall6 @@ -330,7 +330,24 @@ startup_error() { # Determine if there are config files newer than the passed object # uptodate() { - [ -f $1 ] && [ -z "$(find ${CONFDIR} -newer $1)" ] + [ -f $1 ] || return 1 + + local dir + local ifs + + ifs="$IFS" + IFS=':' + + for dir in $CONFIG_PATH; do + if [ -n "$(find ${dir} -newer $1)" ]; then + IFS="$ifs" + return 1; + fi + done + + IFS="$ifs" + + return 0 } #