forked from extern/shorewall_code
Update install scripts to look for .shorewallrc in many places
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
b31f656d63
commit
f2311f1987
@ -143,11 +143,21 @@ if [ $# -eq 0 ]; then
|
||||
#
|
||||
# Load packager's settings if any
|
||||
#
|
||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
||||
. ../shorewall-pkg.config || exit 1
|
||||
if [ -f ./.shorewallrc ]; then
|
||||
. ./.shorewallrc || exit 1
|
||||
file=./.shorewallrc
|
||||
elif [ -r /root/.shorewallrc ]; then
|
||||
. /root/.shorewallrc || exit 1
|
||||
file=/root/.shoreallrc
|
||||
elif [ -r /.shorewallrc ]; then
|
||||
. /.shorewallrc || exit 1
|
||||
file =/.shoreallrc
|
||||
elif [ -f ~/.shorewallrc ]; then
|
||||
. ~/.shorewallrc || exit 1
|
||||
file=~/.shorewallrc
|
||||
elif - -f ${SHOREWALLRC_HOME}/.shorewallrc; then
|
||||
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||
file=${SHOREWALLRC_HOME}/.shorewallrc
|
||||
fi
|
||||
elif [ $# -eq 1 ]; then
|
||||
file=$1
|
||||
@ -155,7 +165,7 @@ elif [ $# -eq 1 ]; then
|
||||
/*|.*)
|
||||
;;
|
||||
*)
|
||||
file=./$file
|
||||
file=./$file || 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -35,7 +35,7 @@ SHOREWALL_CAPVERSION=40502
|
||||
if [ -z "$g_readrc" ]; then
|
||||
|
||||
if [ -f ./.shorewallrc ]; then
|
||||
. ~/.shorewallrc || exit 1
|
||||
. ./.shorewallrc || exit 1
|
||||
elif [ -r /root/.shorewallrc ]; then
|
||||
. /root/.shorewallrc || exit 1
|
||||
elif [ -r /.shorewallrc ]; then
|
||||
|
@ -137,11 +137,21 @@ if [ $# -eq 0 ]; then
|
||||
#
|
||||
# Load packager's settings if any
|
||||
#
|
||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
||||
. ../shorewall-pkg.config || exit 1
|
||||
if [ -f ./.shorewallrc ]; then
|
||||
. ./.shorewallrc || exit 1
|
||||
file=./.shorewallrc
|
||||
elif [ -r /root/.shorewallrc ]; then
|
||||
. /root/.shorewallrc || exit 1
|
||||
file=/root/.shoreallrc
|
||||
elif [ -r /.shorewallrc ]; then
|
||||
. /.shorewallrc || exit 1
|
||||
file =/.shoreallrc
|
||||
elif [ -f ~/.shorewallrc ]; then
|
||||
. ~/.shorewallrc || exit 1
|
||||
file=~/.shorewallrc
|
||||
elif - -f ${SHOREWALLRC_HOME}/.shorewallrc; then
|
||||
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||
file=${SHOREWALLRC_HOME}/.shorewallrc
|
||||
else
|
||||
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
||||
fi
|
||||
|
@ -152,11 +152,21 @@ if [ $# -eq 0 ]; then
|
||||
#
|
||||
# Load packager's settings if any
|
||||
#
|
||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
||||
. ../shorewall-pkg.config || exit 1
|
||||
if [ -f ./.shorewallrc ]; then
|
||||
. ./.shorewallrc || exit 1
|
||||
file=./.shorewallrc
|
||||
elif [ -r /root/.shorewallrc ]; then
|
||||
. /root/.shorewallrc || exit 1
|
||||
file=/root/.shoreallrc
|
||||
elif [ -r /.shorewallrc ]; then
|
||||
. /.shorewallrc || exit 1
|
||||
file =/.shoreallrc
|
||||
elif [ -f ~/.shorewallrc ]; then
|
||||
. ~/.shorewallrc || exit 1
|
||||
file=~/.shorewallrc
|
||||
elif - -f ${SHOREWALLRC_HOME}/.shorewallrc; then
|
||||
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||
file=${SHOREWALLRC_HOME}/.shorewallrc
|
||||
else
|
||||
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
||||
fi
|
||||
|
@ -175,14 +175,23 @@ if [ $# -eq 0 ]; then
|
||||
#
|
||||
# Load packager's settings if any
|
||||
#
|
||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
||||
. ../shorewall-pkg.config || exit 1
|
||||
file = ../shorewall-pkg.config
|
||||
if [ -f ./.shorewallrc ]; then
|
||||
. ./.shorewallrc || exit 1
|
||||
file=./.shorewallrc
|
||||
elif [ -r /root/.shorewallrc ]; then
|
||||
. /root/.shorewallrc || exit 1
|
||||
file=/root/.shoreallrc
|
||||
elif [ -r /.shorewallrc ]; then
|
||||
. /.shorewallrc || exit 1
|
||||
file =/.shoreallrc
|
||||
elif [ -f ~/.shorewallrc ]; then
|
||||
. ~/.shorewallrc || exit 1
|
||||
file=~/.shorewallrc
|
||||
elif - -f ${SHOREWALLRC_HOME}/.shorewallrc; then
|
||||
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||
file=${SHOREWALLRC_HOME}/.shorewallrc
|
||||
else
|
||||
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
||||
fatal_error "No configuration file specified and .shorewallrc not found"
|
||||
fi
|
||||
elif [ $# -eq 1 ]; then
|
||||
file=$1
|
||||
|
Loading…
Reference in New Issue
Block a user