From 2c25deeccf70f8d6bb2688390fb52d2956545c5a Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 19 May 2009 17:11:31 -0700 Subject: [PATCH] Add additional extension script files -- second phase --- Shorewall/configfiles/findgw | 17 ++++++++++++++ Shorewall/install.sh | 45 ++++++++++++++++++++++++++++++++++++ Shorewall/shorewall.spec | 5 ++++ 3 files changed, 67 insertions(+) create mode 100644 Shorewall/configfiles/findgw diff --git a/Shorewall/configfiles/findgw b/Shorewall/configfiles/findgw new file mode 100644 index 000000000..ea6a2d0d7 --- /dev/null +++ b/Shorewall/configfiles/findgw @@ -0,0 +1,17 @@ +# +# Shorewall version 4 - Filegw File +# +# /etc/shorewall/findgw +# +# The code in this file is executed when Shorewall is trying to detect the +# gateway through an interface in /etc/shorewall/providers that has GATEWAY +# specified as 'detect'. +# +# The function should echo the IP address of the gateway if it knows what +# it is; the name of the interface is in $1. +# +# See http://shorewall.net/shorewall_extension_scripts.htm for additional +# information. +# +############################################################################### +#LAST LINE - ADD YOUR ENTRIES ABOVE THIS ONE - DO NOT REMOVE diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 693c10333..a1e3f2938 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -601,6 +601,51 @@ if [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/restored ]; then echo "Restored file installed as ${PREFIX}/etc/shorewall/restored" fi # +# Install the Clear file +# +run_install $OWNERSHIP -m 0644 configfiles/clear ${PREFIX}/usr/share/shorewall/configfiles/clear + +if [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/clear ]; then + run_install $OWNERSHIP -m 0600 configfiles/clear ${PREFIX}/etc/shorewall/clear + echo "Restored file installed as ${PREFIX}/etc/shorewall/clear" +fi +# +# Install the Isusable file +# +run_install $OWNERSHIP -m 0644 configfiles/isusable ${PREFIX}/usr/share/shorewall/configfiles/isusable + +if [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/isusable ]; then + run_install $OWNERSHIP -m 0600 configfiles/isusable ${PREFIX}/etc/shorewall/isusable + echo "Restored file installed as ${PREFIX}/etc/shorewall/isusable" +fi +# +# Install the Refresh file +# +run_install $OWNERSHIP -m 0644 configfiles/refresh ${PREFIX}/usr/share/shorewall/configfiles/refresh + +if [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/refresh ]; then + run_install $OWNERSHIP -m 0600 configfiles/refresh ${PREFIX}/etc/shorewall/refresh + echo "Restored file installed as ${PREFIX}/etc/shorewall/refresh" +fi +# +# Install the Refreshed file +# +run_install $OWNERSHIP -m 0644 configfiles/refreshed ${PREFIX}/usr/share/shorewall/configfiles/refreshed + +if [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/refreshed ]; then + run_install $OWNERSHIP -m 0600 configfiles/refreshed ${PREFIX}/etc/shorewall/refreshed + echo "Restored file installed as ${PREFIX}/etc/shorewall/refreshed" +fi +# +# Install the Tcclear file +# +run_install $OWNERSHIP -m 0644 configfiles/tcclear ${PREFIX}/usr/share/shorewall/configfiles/tcclear + +if [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/tcclear ]; then + run_install $OWNERSHIP -m 0600 configfiles/tcclear ${PREFIX}/etc/shorewall/tcclear + echo "Restored file installed as ${PREFIX}/etc/shorewall/tcclear" +fi +# # Install the Standard Actions file # install_file actions.std ${PREFIX}/usr/share/shorewall/actions.std 0644 diff --git a/Shorewall/shorewall.spec b/Shorewall/shorewall.spec index 1756b89b4..9e4073ae7 100644 --- a/Shorewall/shorewall.spec +++ b/Shorewall/shorewall.spec @@ -93,6 +93,11 @@ fi %attr(0600,root,root) %config(noreplace) /etc/shorewall/blacklist %attr(0600,root,root) %config(noreplace) /etc/shorewall/init %attr(0600,root,root) %config(noreplace) /etc/shorewall/initdone +%attr(0600,root,root) %config(noreplace) /etc/shorewall/clear +%attr(0600,root,root) %config(noreplace) /etc/shorewall/isusable +%attr(0600,root,root) %config(noreplace) /etc/shorewall/refresh +%attr(0600,root,root) %config(noreplace) /etc/shorewall/refreshed +%attr(0600,root,root) %config(noreplace) /etc/shorewall/tcclear %attr(0600,root,root) %config(noreplace) /etc/shorewall/start %attr(0600,root,root) %config(noreplace) /etc/shorewall/stop %attr(0600,root,root) %config(noreplace) /etc/shorewall/stopped