mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-12 20:56:43 +02:00
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
|
# Load packager's settings if any
|
||||||
#
|
#
|
||||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ../shorewall-pkg.config || exit 1
|
. ./.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
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
. ~/.shorewallrc || exit 1
|
. ~/.shorewallrc || exit 1
|
||||||
file=~/.shorewallrc
|
file=~/.shorewallrc
|
||||||
|
elif - -f ${SHOREWALLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
|
file=${SHOREWALLRC_HOME}/.shorewallrc
|
||||||
fi
|
fi
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
file=$1
|
file=$1
|
||||||
@ -155,7 +165,7 @@ elif [ $# -eq 1 ]; then
|
|||||||
/*|.*)
|
/*|.*)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
file=./$file
|
file=./$file || 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ SHOREWALL_CAPVERSION=40502
|
|||||||
if [ -z "$g_readrc" ]; then
|
if [ -z "$g_readrc" ]; then
|
||||||
|
|
||||||
if [ -f ./.shorewallrc ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ~/.shorewallrc || exit 1
|
. ./.shorewallrc || exit 1
|
||||||
elif [ -r /root/.shorewallrc ]; then
|
elif [ -r /root/.shorewallrc ]; then
|
||||||
. /root/.shorewallrc || exit 1
|
. /root/.shorewallrc || exit 1
|
||||||
elif [ -r /.shorewallrc ]; then
|
elif [ -r /.shorewallrc ]; then
|
||||||
|
@ -137,11 +137,21 @@ if [ $# -eq 0 ]; then
|
|||||||
#
|
#
|
||||||
# Load packager's settings if any
|
# Load packager's settings if any
|
||||||
#
|
#
|
||||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ../shorewall-pkg.config || exit 1
|
. ./.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
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
. ~/.shorewallrc || exit 1
|
. ~/.shorewallrc || exit 1
|
||||||
file=~/.shorewallrc
|
file=~/.shorewallrc
|
||||||
|
elif - -f ${SHOREWALLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
|
file=${SHOREWALLRC_HOME}/.shorewallrc
|
||||||
else
|
else
|
||||||
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
||||||
fi
|
fi
|
||||||
|
@ -152,11 +152,21 @@ if [ $# -eq 0 ]; then
|
|||||||
#
|
#
|
||||||
# Load packager's settings if any
|
# Load packager's settings if any
|
||||||
#
|
#
|
||||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ../shorewall-pkg.config || exit 1
|
. ./.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
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
. ~/.shorewallrc || exit 1
|
. ~/.shorewallrc || exit 1
|
||||||
file=~/.shorewallrc
|
file=~/.shorewallrc
|
||||||
|
elif - -f ${SHOREWALLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
|
file=${SHOREWALLRC_HOME}/.shorewallrc
|
||||||
else
|
else
|
||||||
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
||||||
fi
|
fi
|
||||||
|
@ -175,14 +175,23 @@ if [ $# -eq 0 ]; then
|
|||||||
#
|
#
|
||||||
# Load packager's settings if any
|
# Load packager's settings if any
|
||||||
#
|
#
|
||||||
if [ -n "${DESTDIR}" -a -f ../shorewall-pkg.config ]; then
|
if [ -f ./.shorewallrc ]; then
|
||||||
. ../shorewall-pkg.config || exit 1
|
. ./.shorewallrc || exit 1
|
||||||
file = ../shorewall-pkg.config
|
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
|
elif [ -f ~/.shorewallrc ]; then
|
||||||
. ~/.shorewallrc || exit 1
|
. ~/.shorewallrc || exit 1
|
||||||
file=~/.shorewallrc
|
file=~/.shorewallrc
|
||||||
|
elif - -f ${SHOREWALLRC_HOME}/.shorewallrc; then
|
||||||
|
. ${SHOREWALLRC_HOME}/.shorewallrc || exit 1
|
||||||
|
file=${SHOREWALLRC_HOME}/.shorewallrc
|
||||||
else
|
else
|
||||||
fatal_error "No configuration file specified and ~/.shorewallrc not found"
|
fatal_error "No configuration file specified and .shorewallrc not found"
|
||||||
fi
|
fi
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
file=$1
|
file=$1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user