These fix prog.footer to use hardcoded shorewallrc path.

uninstall.sh still needs fixing for .shorewallrc location
logic.

-- 
Tuomo Soini <[email protected]>
Foobar Linux services
+358 40 5240030
Foobar Oy <http://foobar.fi/>
commit 4987d5990768766fd25bc6ee19201810b8895269
Author: Tuomo Soini <[email protected]>
Date:   Mon Apr 2 14:47:50 2012 +0300

    Fix SHAREDIR path on install if necessary

diff --git a/Shorewall/install.sh b/Shorewall/install.sh
index f6b6449..3dfc55c 100755
--- a/Shorewall/install.sh
+++ b/Shorewall/install.sh
@@ -1031,6 +1031,7 @@ if [ -d Perl ]; then
     #
     for f in prog.* ; do
         install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
+	[ $SHAREDIR = /usr/share ] || eval sed -i \'s\|/usr/share/\|${SHAREDIR}/\|\' ${DESTDIR}/${SHAREDIR}/$PRODUCT/$f
         echo "Program skeleton file ${f#*.} installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
     done
 
commit 755f7dc48943af98b8b34a0c977b2c8b039c6a65
Author: Tuomo Soini <[email protected]>
Date:   Mon Apr 2 14:49:03 2012 +0300

    Use build defined SHAREDIR for locating shorewallrc

diff --git a/Shorewall/Perl/prog.footer b/Shorewall/Perl/prog.footer
index 71dab33..55ca022 100644
--- a/Shorewall/Perl/prog.footer
+++ b/Shorewall/Perl/prog.footer
@@ -84,17 +84,11 @@ g_purge=$PURGE
 g_noroutes=$NOROUTES
 g_timestamp=$TIMESTAMP
 g_recovering=$RECOVERING
-
-if [ -f ./.shorewallrc ]; then
-    . ./.shorewallrc || exit 1
-elif [ -f ~/.shorewallrc ]; then
-    . ~/.shorewallrc || exit 1
-elif [ -r /root/.shorewallrc ]; then
-    . /root/.shorewallrc || exit 1
-elif [ -r /.shorewallrc ]; then
-    . /root/.shorewallrc || exit 1
-elif - -f ${SHOREAWLLRC_HOME}/.shorewallrc; then
-    . ${SHOREAWLLRC_HOME}/.shorewallrc || exit 1
+#
+# This is modified by the installer when ${SHAREDIR} <> /usr/share
+#
+if [ -f /usr/share/shorewall/shorewallrc ]; then
+    . /usr/share/shorewall/shorewallrc
 else
     CONFDIR=/etc
     SHAREDIR=/usr/share
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to