mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 08:03:11 +01:00
More splitting up of the product
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5828 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
fe0bdf89e1
commit
e6f78b92c9
@ -211,7 +211,7 @@ fi
|
||||
#
|
||||
cd "$(dirname $0)"
|
||||
|
||||
echo "Installing Shorewall Version $VERSION"
|
||||
echo "Installing Shorewall-common Version $VERSION"
|
||||
|
||||
#
|
||||
# Check for /etc/shorewall
|
||||
@ -282,14 +282,19 @@ if [ ! -f ${PREFIX}/etc/shorewall/zones ]; then
|
||||
echo "Zones file installed as ${PREFIX}/etc/shorewall/zones"
|
||||
fi
|
||||
|
||||
#
|
||||
# Install the Compiler
|
||||
#
|
||||
|
||||
install_file compiler ${PREFIX}/usr/share/shorewall/compiler 0555
|
||||
|
||||
echo
|
||||
echo "Compiler installed in ${PREFIX}/usr/share/shorewall/compiler"
|
||||
delete_file /usr/share/shorewall/compiler
|
||||
delete_file /usr/share/shorewall/lib.accounting
|
||||
delete_file /usr/share/shorewall/lib.actions
|
||||
delete_file /usr/share/shorewall/lib.dynamiczones
|
||||
delete_file /usr/share/shorewall/lib.maclist
|
||||
delete_file /usr/share/shorewall/lib.nat
|
||||
delete_file /usr/share/shorewall/lib.providers
|
||||
delete_file /usr/share/shorewall/lib.proxyarp
|
||||
delete_file /usr/share/shorewall/lib.tc
|
||||
delete_file /usr/share/shorewall/lib.tcrules
|
||||
delete_file /usr/share/shorewall/lib.tunnels
|
||||
delete_file /usr/share/shorewall/prog.header
|
||||
delete_file /usr/share/shorewall/prog.footer
|
||||
|
||||
#
|
||||
# Install wait4ifup
|
||||
@ -742,4 +747,4 @@ fi
|
||||
#
|
||||
# Report Success
|
||||
#
|
||||
echo "shorewall Version $VERSION Installed"
|
||||
echo "shorewall-common Version $VERSION Installed"
|
||||
|
@ -33,6 +33,8 @@ SHOREWALL_LIBVERSION=30402
|
||||
[ -n "${VARDIR:=/var/lib/shorewall}" ]
|
||||
[ -n "${SHAREDIR:=/usr/share/shorewall}" ]
|
||||
[ -n "${CONFDIR:=/etc/shorewall}" ]
|
||||
SHELLSHAREDIR=/usr/share/shorewall-shell
|
||||
PERLSHAREDIR=/usr/share/shorewall-perl
|
||||
|
||||
#
|
||||
# Message to stderr
|
||||
@ -339,11 +341,8 @@ lib_load() # $1 = Name of the Library, $2 = Error Message heading if the library
|
||||
eval loaded=\$LIB_${1}_LOADED
|
||||
|
||||
if [ -z "$loaded" ]; then
|
||||
if [ "$SHOREWALL_COMPILER" = perl ]; then
|
||||
eval LIB_${1}_LOADED=Yes
|
||||
return
|
||||
fi
|
||||
|
||||
[ -f $lib ] || lib=${SHELLSHAREDIR}/lib.$1
|
||||
|
||||
if [ -f $lib ]; then
|
||||
progress_message "Loading library $lib..."
|
||||
. $lib
|
||||
|
@ -1,175 +0,0 @@
|
||||
#
|
||||
# Give Usage Information
|
||||
#
|
||||
usage() {
|
||||
echo "Usage: $0 [ -q ] [ -v ] [ -n ] [ start|stop|clear|reset|refresh|restart|status|version ]"
|
||||
exit $1
|
||||
}
|
||||
################################################################################
|
||||
# E X E C U T I O N B E G I N S H E R E #
|
||||
################################################################################
|
||||
#
|
||||
# Start trace if first arg is "debug" or "trace"
|
||||
#
|
||||
if [ $# -gt 1 ] && [ "x$1" = "xdebug" -o "x$1" = "xtrace" ]; then
|
||||
set -x
|
||||
shift
|
||||
fi
|
||||
|
||||
initialize
|
||||
|
||||
finished=0
|
||||
|
||||
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||
option=$1
|
||||
case $option in
|
||||
-*)
|
||||
option=${option#-}
|
||||
|
||||
[ -z "$option" ] && usage 1
|
||||
|
||||
while [ -n "$option" ]; do
|
||||
case $option in
|
||||
v*)
|
||||
VERBOSE=$(($VERBOSE + 1 ))
|
||||
option=${option#v}
|
||||
;;
|
||||
q*)
|
||||
VERBOSE=$(($VERBOSE - 1 ))
|
||||
option=${option#q}
|
||||
;;
|
||||
n*)
|
||||
NOROUTES=Yes
|
||||
option=${option#n}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
finished=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage 2
|
||||
else
|
||||
COMMAND="$1"
|
||||
fi
|
||||
|
||||
[ -n "${PRODUCT:=Shorewall}" ]
|
||||
|
||||
case "$COMMAND" in
|
||||
start)
|
||||
if shorewall_is_started; then
|
||||
error_message "$PRODUCT is already Running"
|
||||
status=0
|
||||
else
|
||||
progress_message3 "Starting $PRODUCT...."
|
||||
define_firewall
|
||||
status=$?
|
||||
[ -n "$SUBSYSLOCK" -a $status -eq 0 ] && touch $SUBSYSLOCK
|
||||
progress_message3 "done."
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
progress_message3 "Stopping $PRODUCT...."
|
||||
stop_firewall
|
||||
status=0
|
||||
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
|
||||
progress_message3 "done."
|
||||
;;
|
||||
reset)
|
||||
if ! shorewall_is_started ; then
|
||||
error_message "$PRODUCT is not running"
|
||||
status=2
|
||||
else
|
||||
$IPTABLES -Z
|
||||
$IPTABLES -t nat -Z
|
||||
$IPTABLES -t mangle -Z
|
||||
date > ${VARDIR}/restarted
|
||||
status=0
|
||||
progress_message3 "$PRODUCT Counters Reset"
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
if shorewall_is_started; then
|
||||
progress_message3 "Restarting $PRODUCT...."
|
||||
else
|
||||
error_message "$PRODUCT is not running"
|
||||
progress_message3 "Starting $PRODUCT...."
|
||||
fi
|
||||
|
||||
define_firewall
|
||||
status=$?
|
||||
if [ -n "$SUBSYSLOCK" ]; then
|
||||
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
|
||||
fi
|
||||
progress_message3 "done."
|
||||
;;
|
||||
refresh)
|
||||
if shorewall_is_started; then
|
||||
progress_message3 "Refreshing $PRODUCT...."
|
||||
refresh_firewall
|
||||
status=$?
|
||||
progress_message3 "done."
|
||||
else
|
||||
echo "$PRODUCT is not running" >&2
|
||||
status=2
|
||||
fi
|
||||
;;
|
||||
restore)
|
||||
restore_firewall
|
||||
status=$?
|
||||
if [ -n "$SUBSYSLOCK" ]; then
|
||||
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
|
||||
fi
|
||||
;;
|
||||
clear)
|
||||
progress_message3 "Clearing $PRODUCT...."
|
||||
clear_firewall
|
||||
status=0
|
||||
[ -n "$SUBSYSLOCK" ] && rm -f $SUBSYSLOCK
|
||||
progress_message3 "done."
|
||||
;;
|
||||
status)
|
||||
echo "$PRODUCT-$VERSION Status at $HOSTNAME - $(date)"
|
||||
echo
|
||||
if shorewall_is_started; then
|
||||
echo "$PRODUCT is running"
|
||||
status=0
|
||||
else
|
||||
echo "$PRODUCT is stopped"
|
||||
status=4
|
||||
fi
|
||||
|
||||
if [ -f ${VARDIR}/state ]; then
|
||||
state="$(cat ${VARDIR}/state)"
|
||||
case $state in
|
||||
Stopped*|Clear*)
|
||||
status=3
|
||||
;;
|
||||
esac
|
||||
else
|
||||
state=Unknown
|
||||
fi
|
||||
echo "State:$state"
|
||||
echo
|
||||
;;
|
||||
version)
|
||||
echo $VERSION
|
||||
status=0
|
||||
;;
|
||||
help)
|
||||
usage 0
|
||||
;;
|
||||
*)
|
||||
usage 2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $status
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Generated by the Shoreline Firewall (Shorewall) Packet Filtering Firewall - V3.4
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/copyleft/gpl.htm]
|
||||
#
|
||||
# (c) 2006 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
#
|
||||
# Options are:
|
||||
#
|
||||
# -n Don't alter Routing
|
||||
# -v and -q Standard Shorewall Verbosity control
|
||||
#
|
||||
# Commands are:
|
||||
#
|
||||
# start Starts the firewall
|
||||
# refresh Refresh the firewall
|
||||
# restart Restarts the firewall
|
||||
# reload Reload the firewall
|
||||
# clear Removes all firewall rules
|
||||
# stop Stops the firewall
|
||||
# status Displays firewall status
|
||||
# version Displays the version of Shorewall that
|
||||
# generated this program
|
||||
#
|
@ -220,8 +220,9 @@ get_config() {
|
||||
# Run the appropriate compiler
|
||||
#
|
||||
compiler() {
|
||||
local sc=/usr/share/shorewall-shell/compiler
|
||||
local pc=/usr/share/shorewall-perl/compiler.pl
|
||||
local sc=${SHELLSHAREDIR}/compiler
|
||||
local pc=${PERLSHAREDIR}/compiler.pl
|
||||
|
||||
local command=$1
|
||||
|
||||
fatal_error() {
|
||||
@ -281,9 +282,7 @@ compiler() {
|
||||
|
||||
case "$compiler" in
|
||||
perl)
|
||||
#
|
||||
# Perl compiler -- set the appropriate Perl options
|
||||
#
|
||||
[ -x $pc ] || startup_error "SHOREWALL_COMPILER=perl requires the shorewall-perl package which is not installed"
|
||||
debugflags="-w"
|
||||
[ "$1" = debug ] && debugflags='-wd' && shift
|
||||
[ -n "$PROFILE" ] && debugflags='-wd:DProf'
|
||||
@ -293,9 +292,7 @@ compiler() {
|
||||
$command perl $debugflags $pc $@
|
||||
;;
|
||||
shell)
|
||||
#
|
||||
# Shell compiler -- run it
|
||||
#
|
||||
[ -x $sc ] || startup_error "SHOREWALL_COMPILER=shell requires the shorewall-shell package which is not installed"
|
||||
$command $SHOREWALL_SHELL $sc $@
|
||||
;;
|
||||
*)
|
||||
|
@ -1,5 +1,5 @@
|
||||
%define name shorewall
|
||||
%define version 3.4.2
|
||||
%define version 3.9.1
|
||||
%define release 1
|
||||
%define prefix /usr
|
||||
|
||||
@ -23,6 +23,9 @@ The Shoreline Firewall, more commonly known as "Shorewall", is a Netfilter
|
||||
(iptables) based firewall that can be used on a dedicated firewall system,
|
||||
a multi-function gateway/ router/server or on a standalone GNU/Linux system.
|
||||
|
||||
To be fully functional, this package requires installation of either
|
||||
shorewall-shell or shorewall-perl
|
||||
|
||||
%prep
|
||||
|
||||
%setup
|
||||
@ -109,22 +112,11 @@ fi
|
||||
%attr(0644,root,root) /usr/share/shorewall/action.Drop
|
||||
%attr(0644,root,root) /usr/share/shorewall/action.Reject
|
||||
%attr(0644,root,root) /usr/share/shorewall/action.template
|
||||
%attr(0555,root,root) /usr/share/shorewall/compiler
|
||||
%attr(0555,root,root) /usr/share/shorewall/firewall
|
||||
%attr(0777,root,root) /usr/share/shorewall/functions
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.accounting
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.actions
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.base
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.cli
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.config
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.dynamiczones
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.maclist
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.nat
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.providers
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.proxyarp
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.tc
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.tcrules
|
||||
%attr(0444,root,root) /usr/share/shorewall/lib.tunnels
|
||||
%attr(0644,root,root) /usr/share/shorewall/macro.AllowICMPs
|
||||
%attr(0644,root,root) /usr/share/shorewall/macro.Amanda
|
||||
%attr(0644,root,root) /usr/share/shorewall/macro.Auth
|
||||
@ -187,8 +179,6 @@ fi
|
||||
%attr(0644,root,root) /usr/share/shorewall/macro.Webmin
|
||||
%attr(0644,root,root) /usr/share/shorewall/macro.Whois
|
||||
%attr(0644,root,root) /usr/share/shorewall/modules
|
||||
%attr(0644,root,root) /usr/share/shorewall/prog.footer
|
||||
%attr(0644,root,root) /usr/share/shorewall/prog.header
|
||||
%attr(0644,root,root) /usr/share/shorewall/rfc1918
|
||||
%attr(0644,root,root) /usr/share/shorewall/configpath
|
||||
%attr(0555,root,root) /usr/share/shorewall/wait4ifup
|
||||
@ -260,6 +250,8 @@ fi
|
||||
%doc COPYING INSTALL changelog.txt releasenotes.txt tunnel ipsecvpn Samples
|
||||
|
||||
%changelog
|
||||
* Tue Apr 03 2007 Tom Eastep tom@shorewall.net
|
||||
- Updated to 3.9.1-1
|
||||
* Thu Mar 24 2007 Tom Eastep tom@shorewall.net
|
||||
- Updated to 3.4.2-1
|
||||
* Thu Mar 15 2007 Tom Eastep tom@shorewall.net
|
||||
|
Loading…
Reference in New Issue
Block a user