From 9ca82d8bf61a51b271a4e9947ca5b3e14712f01e Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 30 Mar 2012 15:22:06 -0700 Subject: [PATCH] More relocation bugs fixed Signed-off-by: Tom Eastep --- Shorewall-core/install.sh | 15 ++++----------- Shorewall-core/lib.cli | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Shorewall-core/install.sh b/Shorewall-core/install.sh index 67984e659..e5a6fb5b6 100755 --- a/Shorewall-core/install.sh +++ b/Shorewall-core/install.sh @@ -139,8 +139,10 @@ done if [ $# -eq 0 ]; then if [ -f ~/.shorewallrc ]; then . ~/.shorewallrc + file=~/.shorewallrc elif [ -f /usr/share/shorewall/shorewallrc ]; then . /usr/share/shorewall/shorewallrc + file=/usr/share/shorewall/shorewallrc else fatal_error "No configuration file specified and /usr/share/shorewall/shorewallrc not found" fi @@ -155,15 +157,6 @@ elif [ $# -eq 1 ]; then esac . $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 usage 1 fi @@ -259,7 +252,7 @@ if [ -z "$file" ]; then if $HOST = linux; then file=shorewallrc.default else - file=$shorewallrc.${HOST} + file=shorewallrc.${HOST} fi 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 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 diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index a498ea53d..6f8dc4769 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -36,7 +36,7 @@ if [ -z "$g_readrc" ]; then g_readrc=1 fi -. ${g_shardir}/shorewall/lib.base +. ${g_sharedir}/shorewall/lib.base # # Fatal Error