mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 17:28:35 +02:00
Restore logic to make find_file() check for SHOREWALL_DIR
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1259 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
e0e00293fe
commit
7763011f16
@ -9,3 +9,5 @@ Changes since 2.0.1
|
|||||||
4) Implement CONFIG_PATH.
|
4) Implement CONFIG_PATH.
|
||||||
|
|
||||||
5) Apply Stijn Jonker's fix for CONFIG_PATH.
|
5) Apply Stijn Jonker's fix for CONFIG_PATH.
|
||||||
|
|
||||||
|
6) Restore logic to make 'find_file' check for SHOREWALL_DIR separately.
|
||||||
|
@ -5740,8 +5740,6 @@ do_initialize() {
|
|||||||
|
|
||||||
run_user_exit params
|
run_user_exit params
|
||||||
|
|
||||||
[ -n "$SHOREWALL_DIR" ] && CONFIG_PATH=$SHOREWALL_DIR:$CONFIG_PATH
|
|
||||||
|
|
||||||
config=$(find_file shorewall.conf)
|
config=$(find_file shorewall.conf)
|
||||||
|
|
||||||
if [ -f $config ]; then
|
if [ -f $config ]; then
|
||||||
@ -5755,7 +5753,6 @@ do_initialize() {
|
|||||||
# Restore CONFIG_PATH if the shorewall.conf file cleared it
|
# Restore CONFIG_PATH if the shorewall.conf file cleared it
|
||||||
#
|
#
|
||||||
[ -n "$CONFIG_PATH" ] || CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
|
[ -n "$CONFIG_PATH" ] || CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
|
||||||
[ -n "$SHOREWALL_DIR" ] && CONFIG_PATH=$SHOREWALL_DIR:$CONFIG_PATH
|
|
||||||
#
|
#
|
||||||
# Determine the capabilities of the installed iptables/netfilter
|
# Determine the capabilities of the installed iptables/netfilter
|
||||||
#
|
#
|
||||||
|
@ -94,19 +94,23 @@ find_file()
|
|||||||
echo $1
|
echo $1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
saveifs=$IFS
|
if [ -n "$SHOREWALL_DIR" -a -f $SHOREWALL_DIR/$1 ]; then
|
||||||
IFS=:
|
echo $SHOREWALL_DIR/$1
|
||||||
for directory in $CONFIG_PATH; do
|
else
|
||||||
if [ -f $directory/$1 ]; then
|
saveifs=$IFS
|
||||||
echo $directory/$1
|
IFS=:
|
||||||
IFS=$saveifs
|
for directory in $CONFIG_PATH; do
|
||||||
return
|
if [ -f $directory/$1 ]; then
|
||||||
fi
|
echo $directory/$1
|
||||||
done
|
IFS=$saveifs
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
IFS=$saveifs
|
IFS=$saveifs
|
||||||
|
|
||||||
echo /etc/shorewall/$1
|
echo /etc/shorewall/$1
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -632,7 +632,6 @@ FUNCTIONS=$SHARED_DIR/functions
|
|||||||
VERSION_FILE=$SHARED_DIR/version
|
VERSION_FILE=$SHARED_DIR/version
|
||||||
HELP=$SHARED_DIR/help
|
HELP=$SHARED_DIR/help
|
||||||
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
|
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
|
||||||
[ -n "$SHOREWALL_DIR" ] && CONFIG_PATH=$SHOREWALL_DIR:$CONFIG_PATH
|
|
||||||
|
|
||||||
if [ -f $FUNCTIONS ]; then
|
if [ -f $FUNCTIONS ]; then
|
||||||
. $FUNCTIONS
|
. $FUNCTIONS
|
||||||
@ -650,10 +649,7 @@ else
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$CONFIG_PATH" ]; then
|
[ -z "$CONFIG_PATH" ] && CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
|
||||||
CONFIG_PATH=/etc/shorewall:/usr/share/shorewall
|
|
||||||
[ -n "$SHOREWALL_DIR" ] && CONFIG_PATH=$SHOREWALL_DIR:$CONFIG_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -z "${STATEDIR}" ] && STATEDIR=/var/state/shorewall
|
[ -z "${STATEDIR}" ] && STATEDIR=/var/state/shorewall
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user