More relocation bugs fixed

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-03-30 15:22:06 -07:00
parent 6a2f907ee1
commit 9ca82d8bf6
2 changed files with 5 additions and 12 deletions

View File

@ -139,8 +139,10 @@ done
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
if [ -f ~/.shorewallrc ]; then if [ -f ~/.shorewallrc ]; then
. ~/.shorewallrc . ~/.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
else else
fatal_error "No configuration file specified and /usr/share/shorewall/shorewallrc not found" fatal_error "No configuration file specified and /usr/share/shorewall/shorewallrc not found"
fi fi
@ -155,15 +157,6 @@ elif [ $# -eq 1 ]; then
esac esac
. $file . $file
if [ -n "$RPM" -a -f config ]; then
. $config || exit 1
> shorewallrc
for var in HOST SHAREDIR LIBEXECDIR PERLLIBDIR CONFDIR SBINDIR MANDIR INITDIR INITSOURCE INITFILE AUXINITSOURCE AUXINITFILE SYSTEMD SYSCONFFILE SYSCONFDIR ANNOTATED VARDIR; do
eval echo $var=\$$var >> shorewallrc
done
file=shorewallrc
fi
else else
usage 1 usage 1
fi fi
@ -259,7 +252,7 @@ if [ -z "$file" ]; then
if $HOST = linux; then if $HOST = linux; then
file=shorewallrc.default file=shorewallrc.default
else else
file=$shorewallrc.${HOST} file=shorewallrc.${HOST}
fi fi
echo "You have not specified a configuration file and ~/.shorewallrc does not exist" >&2 echo "You have not specified a configuration file and ~/.shorewallrc does not exist" >&2
@ -317,7 +310,7 @@ ln -sf lib.base ${DESTDIR}${SHAREDIR}/shorewall/functions
echo "$VERSION" > ${DESTDIR}${SHAREDIR}/shorewall/coreversion echo "$VERSION" > ${DESTDIR}${SHAREDIR}/shorewall/coreversion
chmod 644 ${DESTDIR}${SHAREDIR}/shorewall/coreversion chmod 644 ${DESTDIR}${SHAREDIR}/shorewall/coreversion
cp $file ${DESTDIR}${SHAREDIR}/shorewall/shorewallrc [ $file != "${SHAREDIR}/shorewall/shorewallrc" ] && cp $file ${DESTDIR}${SHAREDIR}/shorewall/shorewallrc
[ -z "${DESTDIR}" ] && [ ! -f ~/.shorewallrc ] && cp ${SHAREDIR}/shorewall/shorewallrc ~/.shorewallrc [ -z "${DESTDIR}" ] && [ ! -f ~/.shorewallrc ] && cp ${SHAREDIR}/shorewall/shorewallrc ~/.shorewallrc

View File

@ -36,7 +36,7 @@ if [ -z "$g_readrc" ]; then
g_readrc=1 g_readrc=1
fi fi
. ${g_shardir}/shorewall/lib.base . ${g_sharedir}/shorewall/lib.base
# #
# Fatal Error # Fatal Error