Look for ./shorewallrc first

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-03-31 17:40:18 -07:00
parent d4f93688b5
commit 02a68aa436
4 changed files with 17 additions and 17 deletions

View File

@ -137,12 +137,12 @@ done
# Read the RC file
#
if [ $# -eq 0 ]; then
if [ -f ~/.shorewallrc ]; then
. ~/.shorewallrc
if [ -f ./shorewallrc ]; then
. ./shorewallrc
file=~/.shorewallrc
elif [ -f ./.shorewallrc ]; then
. ./.shorewallrc || exit 1
file=./.shorewallrc
. ~/.shorewallrc || exit 1
file=~/.shorewallrc
elif [ -f /usr/share/shorewall/shorewallrc ]; then
. /usr/share/shorewall/shorewallrc
file=/usr/share/shorewall/shorewallrc

View File

@ -136,11 +136,11 @@ if [ $# -eq 0 ]; then
#
# Load packager's settings if any
#
if [ -f ~/.shorewallrc ]; then
. ~/.shorewallrc || exit 1
if [ -f ./shorewallrc ]; then
. ./shorewallrc || exit 1
file=~/.shorewallrc
elif [ -f ./.shorewallrc ]; then
. ./.shorewallrc || exit 1
elif [ -f ~/.shorewallrc ]; then
. ~/.shorewallrc || exit 1
file=./.shorewallrc
else
fatal_error "No configuration file specified and ~/.shorewallrc not found"

View File

@ -146,11 +146,11 @@ done
# Read the RC file
#
if [ $# -eq 0 ]; then
if [ -f ~/.shorewallrc ]; then
if [ -f ./shorewallrc ]; then
. ./shorewallrc || exit 1
file=./shorewallrc
elif [ -f ~/.shorewallrc ]; then
. ~/.shorewallrc
elif [ -f ./.shorewallrc ]; then
. ./.shorewallrc || exit 1
file=./.shorewallrc
elif [ -f /usr/share/shorewall/shorewallrc ]; then
. /usr/share/shorewall/shorewallrc
else
@ -362,7 +362,7 @@ if [ -n "$INITFILE" ]; then
[ "${SHAREDIR}" = /usr/share ] || eval sed -i \'s\|/usr/share/|${SHAREDIR}/|\' "$initfile"
echo "$Product init script installed in ${DESTDIR}${INITDIR}/${INITFILE}"
echo "$Product init script installed in $initfile"
fi
#
# Install the .service file

View File

@ -168,10 +168,10 @@ done
# Read the RC file
#
if [ $# -eq 0 ]; then
if [ -f ~/.shorewallrc ]; then
. ~/.shorewallrc
elif [ -f ./.shorewallrc ]; then
. ./.shorewallrc || exit 1
if [ -f ./shorewallrc ]; then
. ./shorewallrc
elif [ -f ~/.shorewallrc ]; then
. ~/.shorewallrc || exit 1
file=./.shorewallrc
elif [ -f /usr/share/shorewall/shorewallrc ]; then
. /usr/share/shorewall/shorewallrc