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 # Read the RC file
# #
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
if [ -f ~/.shorewallrc ]; then if [ -f ./shorewallrc ]; then
. ~/.shorewallrc . ./shorewallrc
file=~/.shorewallrc file=~/.shorewallrc
elif [ -f ./.shorewallrc ]; then elif [ -f ./.shorewallrc ]; then
. ./.shorewallrc || exit 1 . ~/.shorewallrc || exit 1
file=./.shorewallrc file=~/.shorewallrc
elif [ -f /usr/share/shorewall/shorewallrc ]; then elif [ -f /usr/share/shorewall/shorewallrc ]; then
. /usr/share/shorewall/shorewallrc . /usr/share/shorewall/shorewallrc
file=/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 # Load packager's settings if any
# #
if [ -f ~/.shorewallrc ]; then if [ -f ./shorewallrc ]; then
. ~/.shorewallrc || exit 1 . ./shorewallrc || exit 1
file=~/.shorewallrc file=~/.shorewallrc
elif [ -f ./.shorewallrc ]; then elif [ -f ~/.shorewallrc ]; then
. ./.shorewallrc || exit 1 . ~/.shorewallrc || exit 1
file=./.shorewallrc file=./.shorewallrc
else else
fatal_error "No configuration file specified and ~/.shorewallrc not found" fatal_error "No configuration file specified and ~/.shorewallrc not found"

View File

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

View File

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