mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
installer and init script changes
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8965 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
76ce744c6c
commit
365ca76fe1
@ -1,23 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: shorewall-lite
|
# Provides: shorewall6-lite
|
||||||
# Required-Start: $network
|
# Required-Start: $network
|
||||||
# Required-Stop: $network
|
# Required-Stop: $network
|
||||||
# Default-Start: S
|
# Default-Start: S
|
||||||
# Default-Stop: 0 6
|
# Default-Stop: 0 6
|
||||||
# Short-Description: Configure the firewall at boot time
|
# Short-Description: Configure the firewall at boot time
|
||||||
# Description: Configure the firewall according to the rules specified in
|
# Description: Configure the firewall according to the rules specified in
|
||||||
# /etc/shorewall-lite
|
# /etc/shorewall6-lite
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SRWL=/sbin/shorewall-lite
|
SRWL=/sbin/shorewall6-lite
|
||||||
SRWL_OPTS="-tvv"
|
SRWL_OPTS="-tvv"
|
||||||
# Note, set INITLOG to /dev/null if you do not want to
|
# Note, set INITLOG to /dev/null if you do not want to
|
||||||
# keep logs of the firewall (not recommended)
|
# keep logs of the firewall (not recommended)
|
||||||
INITLOG=/var/log/shorewall-lite-init.log
|
INITLOG=/var/log/shorewall6-lite-init.log
|
||||||
|
|
||||||
test -x $SRWL || exit 0
|
test -x $SRWL || exit 0
|
||||||
test -x $WAIT_FOR_IFUP || exit 0
|
test -x $WAIT_FOR_IFUP || exit 0
|
||||||
@ -49,7 +49,7 @@ not_configured () {
|
|||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Please read about Debian specific customization in"
|
echo "Please read about Debian specific customization in"
|
||||||
echo "/usr/share/doc/shorewall/README.Debian.gz."
|
echo "/usr/share/doc/shorewall6-lite/README.Debian.gz."
|
||||||
fi
|
fi
|
||||||
echo "#################"
|
echo "#################"
|
||||||
exit 0
|
exit 0
|
||||||
@ -63,7 +63,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check if shorewall is configured or not
|
# check if shorewall is configured or not
|
||||||
if [ -f "/etc/default/shorewall-lite" ]
|
if [ -f "/etc/default/shorewall6-lite" ]
|
||||||
then
|
then
|
||||||
. /etc/default/shorewall-lite
|
. /etc/default/shorewall-lite
|
||||||
SRWL_OPTS="$SRWL_OPTS $OPTIONS"
|
SRWL_OPTS="$SRWL_OPTS $OPTIONS"
|
||||||
@ -77,7 +77,7 @@ fi
|
|||||||
|
|
||||||
# start the firewall
|
# start the firewall
|
||||||
shorewall_start () {
|
shorewall_start () {
|
||||||
echo -n "Starting \"Shorewall firewall\": "
|
echo -n "Starting \"Shorewall6 Lite firewall\": "
|
||||||
$SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -91,14 +91,14 @@ shorewall_stop () {
|
|||||||
|
|
||||||
# restart the firewall
|
# restart the firewall
|
||||||
shorewall_restart () {
|
shorewall_restart () {
|
||||||
echo -n "Restarting \"Shorewall firewall\": "
|
echo -n "Restarting \"Shorewall6 Lite firewall\": "
|
||||||
$SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# refresh the firewall
|
# refresh the firewall
|
||||||
shorewall_refresh () {
|
shorewall_refresh () {
|
||||||
echo -n "Refreshing \"Shorewall firewall\": "
|
echo -n "Refreshing \"Shorewall6 Lite firewall\": "
|
||||||
$SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ case "$1" in
|
|||||||
shorewall_restart
|
shorewall_restart
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/shorewall-lite {start|stop|refresh|restart|force-reload}"
|
echo "Usage: /etc/init.d/shorewall6-lite {start|stop|refresh|restart|force-reload}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -29,19 +29,19 @@ RCDLINKS="2,S41 3,S41 6,K41"
|
|||||||
#
|
#
|
||||||
# Commands are:
|
# Commands are:
|
||||||
#
|
#
|
||||||
# shorewall start Starts the firewall
|
# shorewall6-lite start Starts the firewall
|
||||||
# shorewall restart Restarts the firewall
|
# shorewall6-lite restart Restarts the firewall
|
||||||
# shorewall reload Reload the firewall
|
# shorewall6-lite reload Reload the firewall
|
||||||
# (same as restart)
|
# (same as restart)
|
||||||
# shorewall stop Stops the firewall
|
# shorewall6-lite stop Stops the firewall
|
||||||
# shorewall status Displays firewall status
|
# shorewall6-lite status Displays firewall status
|
||||||
#
|
#
|
||||||
|
|
||||||
# chkconfig: 2345 25 90
|
# chkconfig: 2345 25 90
|
||||||
# description: Packet filtering firewall
|
# description: Packet filtering firewall
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: shorewall-lite
|
# Provides: shorewall6-lite
|
||||||
# Required-Start: $network
|
# Required-Start: $network
|
||||||
# Required-Stop:
|
# Required-Stop:
|
||||||
# Default-Start: 2 3 5
|
# Default-Start: 2 3 5
|
||||||
@ -61,10 +61,10 @@ usage() {
|
|||||||
# Get startup options (override default)
|
# Get startup options (override default)
|
||||||
################################################################################
|
################################################################################
|
||||||
OPTIONS=
|
OPTIONS=
|
||||||
if [ -f /etc/sysconfig/shorewall ]; then
|
if [ -f /etc/sysconfig/shorewall6-lite ]; then
|
||||||
. /etc/sysconfig/shorewall
|
. /etc/sysconfig/shorewall6-lite
|
||||||
elif [ -f /etc/default/shorewall ] ; then
|
elif [ -f /etc/default/shorewall6-lite ] ; then
|
||||||
. /etc/default/shorewall
|
. /etc/default/shorewall6-lite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -74,14 +74,14 @@ command="$1"
|
|||||||
|
|
||||||
case "$command" in
|
case "$command" in
|
||||||
start)
|
start)
|
||||||
exec /sbin/shorewall-lite $OPTIONS $@
|
exec /sbin/shorewall6-lite $OPTIONS $@
|
||||||
;;
|
;;
|
||||||
stop|restart|status)
|
stop|restart|status)
|
||||||
exec /sbin/shorewall-lite $@
|
exec /sbin/shorewall6-lite $@
|
||||||
;;
|
;;
|
||||||
reload)
|
reload)
|
||||||
shift
|
shift
|
||||||
exec /sbin/shorewall-lite restart $@
|
exec /sbin/shorewall6-lite restart $@
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Script to install Shoreline Firewall Lite
|
# Script to install Shoreline Firewall 6 Lite
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
@ -22,7 +22,7 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
#
|
#
|
||||||
|
|
||||||
VERSION=4.2.1
|
VERSION=4.3.0
|
||||||
|
|
||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
@ -73,7 +73,7 @@ run_install()
|
|||||||
cant_autostart()
|
cant_autostart()
|
||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
echo "WARNING: Unable to configure shorewall to start automatically at boot" >&2
|
echo "WARNING: Unable to configure shorewall6-lite to start automatically at boot" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
backup_directory() # $1 = directory to backup
|
backup_directory() # $1 = directory to backup
|
||||||
@ -142,7 +142,7 @@ if [ -z "$DEST" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$INIT" ] ; then
|
if [ -z "$INIT" ] ; then
|
||||||
INIT="shorewall-lite"
|
INIT="shorewall6-lite"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$RUNLEVELS" ] ; then
|
if [ -z "$RUNLEVELS" ] ; then
|
||||||
@ -165,7 +165,7 @@ while [ $# -gt 0 ] ; do
|
|||||||
usage 0
|
usage 0
|
||||||
;;
|
;;
|
||||||
-v)
|
-v)
|
||||||
echo "Shorewall Lite Firewall Installer Version $VERSION"
|
echo "Shorewall6 Lite Firewall Installer Version $VERSION"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-n)
|
-n)
|
||||||
@ -203,7 +203,7 @@ elif [ -f /etc/slackware-version ] ; then
|
|||||||
INIT="rc.firewall"
|
INIT="rc.firewall"
|
||||||
elif [ -f /etc/arch-release ] ; then
|
elif [ -f /etc/arch-release ] ; then
|
||||||
DEST="/etc/rc.d"
|
DEST="/etc/rc.d"
|
||||||
INIT="shorewall-lite"
|
INIT="shorewall6-lite"
|
||||||
ARCHLINUX=yes
|
ARCHLINUX=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -212,122 +212,122 @@ fi
|
|||||||
#
|
#
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
|
|
||||||
echo "Installing Shorewall Lite Version $VERSION"
|
echo "Installing Shorewall6 Lite Version $VERSION"
|
||||||
|
|
||||||
#
|
#
|
||||||
# First do Backups
|
# First do Backups
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for /etc/shorewall-lite
|
# Check for /etc/shorewall6-lite
|
||||||
#
|
#
|
||||||
if [ -z "$PREFIX" -a -d /etc/shorewall-lite ]; then
|
if [ -z "$PREFIX" -a -d /etc/shorewall6-lite ]; then
|
||||||
first_install=""
|
first_install=""
|
||||||
if [ -z "$NOBACKUP" ]; then
|
if [ -z "$NOBACKUP" ]; then
|
||||||
backup_directory /etc/shorewall-lite
|
backup_directory /etc/shorewall6-lite
|
||||||
backup_directory /usr/share/shorewall-lite
|
backup_directory /usr/share/shorewall6-lite
|
||||||
backup_directory /var/lib/shorewall-lite
|
backup_directory /var/lib/shorewall6-lite
|
||||||
fi
|
fi
|
||||||
[ -f /etc/shorewall-lite/shorewall.conf ] && \
|
[ -f /etc/shorewall6-lite/shorewall.conf ] && \
|
||||||
mv -f /etc/shorewall-lite/shorewall.conf /etc/shorewall-lite/shorewall-lite.conf
|
mv -f /etc/shorewall6-lite/shorewall.conf /etc/shorewall6-lite/shorewall6-lite.conf
|
||||||
else
|
else
|
||||||
first_install="Yes"
|
first_install="Yes"
|
||||||
rm -rf ${PREFIX}/etc/shorewall-lite
|
rm -rf ${PREFIX}/etc/shorewall6-lite
|
||||||
rm -rf ${PREFIX}/usr/share/shorewall-lite
|
rm -rf ${PREFIX}/usr/share/shorewall6-lite
|
||||||
rm -rf ${PREFIX}/var/lib/shorewall-lite
|
rm -rf ${PREFIX}/var/lib/shorewall6-lite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
delete_file ${PREFIX}/usr/share/shorewall-lite/xmodules
|
delete_file ${PREFIX}/usr/share/shorewall6-lite/xmodules
|
||||||
|
|
||||||
install_file_with_backup shorewall-lite ${PREFIX}/sbin/shorewall-lite 0544 ${PREFIX}/var/lib/shorewall-lite-${VERSION}.bkout
|
install_file_with_backup shorewall6-lite ${PREFIX}/sbin/shorewall6-lite 0544 ${PREFIX}/var/lib/shorewall6-lite-${VERSION}.bkout
|
||||||
|
|
||||||
echo "Shorewall Lite control program installed in ${PREFIX}/sbin/shorewall-lite"
|
echo "Shorewall6 Lite control program installed in ${PREFIX}/sbin/shorewall6-lite"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the Firewall Script
|
# Install the Firewall Script
|
||||||
#
|
#
|
||||||
if [ -n "$DEBIAN" ]; then
|
if [ -n "$DEBIAN" ]; then
|
||||||
install_file_with_backup init.debian.sh /etc/init.d/shorewall-lite 0544 ${PREFIX}/usr/share/shorewall-lite-${VERSION}.bkout
|
install_file_with_backup init.debian.sh /etc/init.d/shorewall6-lite 0544 ${PREFIX}/usr/share/shorewall6-lite-${VERSION}.bkout
|
||||||
elif [ -n "$ARCHLINUX" ]; then
|
elif [ -n "$ARCHLINUX" ]; then
|
||||||
install_file_with_backup init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-lite-${VERSION}.bkout
|
install_file_with_backup init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall6-lite-${VERSION}.bkout
|
||||||
|
|
||||||
else
|
else
|
||||||
install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-lite-${VERSION}.bkout
|
install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall6-lite-${VERSION}.bkout
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Shorewall Lite script installed in ${PREFIX}${DEST}/$INIT"
|
echo "Shorewall6 Lite script installed in ${PREFIX}${DEST}/$INIT"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create /etc/shorewall-lite, /usr/share/shorewall-lite and /var/lib/shorewall-lite if needed
|
# Create /etc/shorewall6-lite, /usr/share/shorewall6-lite and /var/lib/shorewall6-lite if needed
|
||||||
#
|
#
|
||||||
mkdir -p ${PREFIX}/etc/shorewall-lite
|
mkdir -p ${PREFIX}/etc/shorewall6-lite
|
||||||
mkdir -p ${PREFIX}/usr/share/shorewall-lite
|
mkdir -p ${PREFIX}/usr/share/shorewall6-lite
|
||||||
mkdir -p ${PREFIX}/var/lib/shorewall-lite
|
mkdir -p ${PREFIX}/var/lib/shorewall6-lite
|
||||||
|
|
||||||
chmod 755 ${PREFIX}/etc/shorewall-lite
|
chmod 755 ${PREFIX}/etc/shorewall6-lite
|
||||||
chmod 755 ${PREFIX}/usr/share/shorewall-lite
|
chmod 755 ${PREFIX}/usr/share/shorewall6-lite
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the config file
|
# Install the config file
|
||||||
#
|
#
|
||||||
if [ ! -f ${PREFIX}/etc/shorewall-lite/shorewall-lite.conf ]; then
|
if [ ! -f ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf ]; then
|
||||||
run_install $OWNERSHIP -m 0744 shorewall-lite.conf ${PREFIX}/etc/shorewall-lite/shorewall-lite.conf
|
run_install $OWNERSHIP -m 0744 shorewall6-lite.conf ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf
|
||||||
echo "Config file installed as ${PREFIX}/etc/shorewall-lite/shorewall-lite.conf"
|
echo "Config file installed as ${PREFIX}/etc/shorewall6-lite/shorewall6-lite.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$ARCHLINUX" ] ; then
|
if [ -n "$ARCHLINUX" ] ; then
|
||||||
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall-lite/shorewall.conf
|
sed -e 's!LOGFILE=/var/log/messages!LOGFILE=/var/log/messages.log!' -i ${PREFIX}/etc/shorewall6-lite/shorewall.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the Makefile
|
# Install the Makefile
|
||||||
#
|
#
|
||||||
run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall-lite/Makefile
|
run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall6-lite/Makefile
|
||||||
echo "Makefile installed as ${PREFIX}/etc/shorewall-lite/Makefile"
|
echo "Makefile installed as ${PREFIX}/etc/shorewall6-lite/Makefile"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the default config path file
|
# Install the default config path file
|
||||||
#
|
#
|
||||||
install_file configpath ${PREFIX}/usr/share/shorewall-lite/configpath 0644
|
install_file configpath ${PREFIX}/usr/share/shorewall6-lite/configpath 0644
|
||||||
echo "Default config path file installed as ${PREFIX}/usr/share/shorewall-lite/configpath"
|
echo "Default config path file installed as ${PREFIX}/usr/share/shorewall6-lite/configpath"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the libraries
|
# Install the libraries
|
||||||
#
|
#
|
||||||
for f in lib.* ; do
|
for f in lib.* ; do
|
||||||
if [ -f $f ]; then
|
if [ -f $f ]; then
|
||||||
install_file $f ${PREFIX}/usr/share/shorewall-lite/$f 0644
|
install_file $f ${PREFIX}/usr/share/shorewall6-lite/$f 0644
|
||||||
echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall-lite/$f"
|
echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall6-lite/$f"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
ln -sf lib.base ${PREFIX}/usr/share/shorewall-lite/functions
|
ln -sf lib.base ${PREFIX}/usr/share/shorewall6-lite/functions
|
||||||
|
|
||||||
echo "Common functions linked through ${PREFIX}/usr/share/shorewall-lite/functions"
|
echo "Common functions linked through ${PREFIX}/usr/share/shorewall6-lite/functions"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install Shorecap
|
# Install Shorecap
|
||||||
#
|
#
|
||||||
|
|
||||||
install_file shorecap ${PREFIX}/usr/share/shorewall-lite/shorecap 0755
|
install_file shorecap ${PREFIX}/usr/share/shorewall6-lite/shorecap 0755
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Capability file builder installed in ${PREFIX}/usr/share/shorewall-lite/shorecap"
|
echo "Capability file builder installed in ${PREFIX}/usr/share/shorewall6-lite/shorecap"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install wait4ifup
|
# Install wait4ifup
|
||||||
#
|
#
|
||||||
|
|
||||||
install_file wait4ifup ${PREFIX}/usr/share/shorewall-lite/wait4ifup 0755
|
install_file wait4ifup ${PREFIX}/usr/share/shorewall6-lite/wait4ifup 0755
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall-lite/wait4ifup"
|
echo "wait4ifup installed in ${PREFIX}/usr/share/shorewall6-lite/wait4ifup"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the Modules file
|
# Install the Modules file
|
||||||
#
|
#
|
||||||
run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall-lite/modules
|
run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall6-lite/modules
|
||||||
echo "Modules file installed as ${PREFIX}/usr/share/shorewall-lite/modules"
|
echo "Modules file installed as ${PREFIX}/usr/share/shorewall6-lite/modules"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install the Man Pages
|
# Install the Man Pages
|
||||||
@ -354,40 +354,40 @@ echo "Man Pages Installed"
|
|||||||
#
|
#
|
||||||
# Create the version file
|
# Create the version file
|
||||||
#
|
#
|
||||||
echo "$VERSION" > ${PREFIX}/usr/share/shorewall-lite/version
|
echo "$VERSION" > ${PREFIX}/usr/share/shorewall6-lite/version
|
||||||
chmod 644 ${PREFIX}/usr/share/shorewall-lite/version
|
chmod 644 ${PREFIX}/usr/share/shorewall6-lite/version
|
||||||
#
|
#
|
||||||
# Remove and create the symbolic link to the init script
|
# Remove and create the symbolic link to the init script
|
||||||
#
|
#
|
||||||
|
|
||||||
if [ -z "$PREFIX" ]; then
|
if [ -z "$PREFIX" ]; then
|
||||||
rm -f /usr/share/shorewall-lite/init
|
rm -f /usr/share/shorewall6-lite/init
|
||||||
ln -s ${DEST}/${INIT} /usr/share/shorewall-lite/init
|
ln -s ${DEST}/${INIT} /usr/share/shorewall6-lite/init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
if [ -z "$PREFIX" -a -n "$first_install" ]; then
|
||||||
if [ -n "$DEBIAN" ]; then
|
if [ -n "$DEBIAN" ]; then
|
||||||
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall-lite
|
run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall6-lite
|
||||||
ln -s ../init.d/shorewall-lite /etc/rcS.d/S40shorewall-lite
|
ln -s ../init.d/shorewall6-lite /etc/rcS.d/S40shorewall6-lite
|
||||||
echo "Shorewall Lite will start automatically at boot"
|
echo "Shorewall6 Lite will start automatically at boot"
|
||||||
touch /var/log/shorewall-init.log
|
touch /var/log/shorewall-init.log
|
||||||
else
|
else
|
||||||
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
|
||||||
if insserv /etc/init.d/shorewall-lite ; then
|
if insserv /etc/init.d/shorewall6-lite ; then
|
||||||
echo "Shorewall Lite will start automatically at boot"
|
echo "Shorewall6 Lite will start automatically at boot"
|
||||||
else
|
else
|
||||||
cant_autostart
|
cant_autostart
|
||||||
fi
|
fi
|
||||||
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
|
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
|
||||||
if chkconfig --add shorewall-lite ; then
|
if chkconfig --add shorewall6-lite ; then
|
||||||
echo "Shorewall Lite will start automatically in run levels as follows:"
|
echo "Shorewall6 Lite will start automatically in run levels as follows:"
|
||||||
chkconfig --list shorewall-lite
|
chkconfig --list shorewall6-lite
|
||||||
else
|
else
|
||||||
cant_autostart
|
cant_autostart
|
||||||
fi
|
fi
|
||||||
elif [ -x /sbin/rc-update ]; then
|
elif [ -x /sbin/rc-update ]; then
|
||||||
if rc-update add shorewall-lite default; then
|
if rc-update add shorewall6-lite default; then
|
||||||
echo "Shorewall Lite will start automatically at boot"
|
echo "Shorewall6 Lite will start automatically at boot"
|
||||||
else
|
else
|
||||||
cant_autostart
|
cant_autostart
|
||||||
fi
|
fi
|
||||||
@ -400,4 +400,4 @@ fi
|
|||||||
#
|
#
|
||||||
# Report Success
|
# Report Success
|
||||||
#
|
#
|
||||||
echo "shorewall Lite Version $VERSION Installed"
|
echo "shorewall6 Lite Version $VERSION Installed"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# /etc/shorewall-lite/shorewall-lite.conf Version 4 - Change the following
|
# /etc/shorewall6-lite/shorewall-lite.conf Version 4 - Change the following
|
||||||
# variables to override the values in the shorewall.conf file used to
|
# variables to override the values in the shorewall.conf file used to
|
||||||
# compile /var/lib/shorewall-lite/firewall. Those values may be found in
|
# compile /var/lib/shorewall-lite/firewall. Those values may be found in
|
||||||
# /var/lib/shorewall-lite/firewall.conf.
|
# /var/lib/shorewall-lite/firewall.conf.
|
||||||
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# This file should be placed in /etc/shorewall-lite
|
# This file should be placed in /etc/shorewall-lite
|
||||||
#
|
#
|
||||||
# (c) 2006,2007 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2006,2007,2008 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# N 0 T E
|
# N 0 T E
|
||||||
@ -36,7 +36,7 @@ LOGFORMAT=
|
|||||||
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
|
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
IPTABLES=
|
IP6TABLES=
|
||||||
|
|
||||||
PATH=
|
PATH=
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
%define name shorewall-lite
|
%define name shorewall6-lite
|
||||||
%define version 4.2.1
|
%define version 4.3.0
|
||||||
%define release 0base
|
%define release 0base
|
||||||
|
|
||||||
Summary: Shoreline Firewall Lite is an iptables-based firewall for Linux systems.
|
Summary: Shoreline Firewall 6 Lite is an ip6tables-based firewall for Linux systems.
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}
|
Release: %{release}
|
||||||
@ -17,12 +17,12 @@ Requires: iptables iproute
|
|||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
||||||
The Shoreline Firewall, more commonly known as "Shorewall", is a Netfilter
|
The Shoreline Firewall 6, more commonly known as "Shorewall6", is a Netfilter
|
||||||
(iptables) based firewall that can be used on a dedicated firewall system,
|
(ip6tables) based firewall that can be used on a dedicated firewall system,
|
||||||
a multi-function gateway/ router/server or on a standalone GNU/Linux system.
|
a multi-function gateway/ router/server or on a standalone GNU/Linux system.
|
||||||
|
|
||||||
Shorewall Lite is a companion product to Shorewall that allows network
|
Shorewall Lite is a companion product to Shorewall6 that allows network
|
||||||
administrators to centralize the configuration of Shorewall-based firewalls.
|
administrators to centralize the configuration of Shorewall6-based firewalls.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
|
||||||
@ -41,184 +41,57 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%pre
|
%pre
|
||||||
|
|
||||||
if [ -f /etc/shorewall-lite/shorewall.conf ]; then
|
|
||||||
cp -fa /etc/shorewall-lite/shorewall.conf /etc/shorewall-lite/shorewall.conf.rpmsave
|
|
||||||
fi
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
if [ -x /sbin/insserv ]; then
|
if [ -x /sbin/insserv ]; then
|
||||||
/sbin/insserv /etc/rc.d/shorewall-lite
|
/sbin/insserv /etc/rc.d/shorewall6-lite
|
||||||
elif [ -x /sbin/chkconfig ]; then
|
elif [ -x /sbin/chkconfig ]; then
|
||||||
/sbin/chkconfig --add shorewall-lite;
|
/sbin/chkconfig --add shorewall6-lite;
|
||||||
fi
|
fi
|
||||||
elif [ -f /etc/shorewall-lite/shorewall.conf.rpmsave ]; then
|
elif [ -f /etc/shorewall6-lite/shorewall.conf.rpmsave ]; then
|
||||||
mv -f /etc/shorewall-lite/shorewall-lite.conf /etc/shorewall-lite/shorewall-lite.conf.rpmnew
|
mv -f /etc/shorewall6-lite/shorewall6-lite.conf /etc/shorewall6-lite/shorewall6-lite.conf.rpmnew
|
||||||
mv -f /etc/shorewall-lite/shorewall.conf.rpmsave /etc/shorewall-lite/shorewall-lite.conf
|
mv -f /etc/shorewall6-lite/shorewall.conf.rpmsave /etc/shorewall6-lite/shorewall6-lite.conf
|
||||||
echo "/etc/shorewall-lite/shorewall.conf retained as /etc/shorewall-lite/shorewall-lite.conf"
|
echo "/etc/shorewall6-lite/shorewall.conf retained as /etc/shorewall6-lite/shorewall6-lite.conf"
|
||||||
echo "/etc/shorewall-lite/shorewall-lite.conf installed as /etc/shorewall-lite/shorewall-lite.conf.rpmnew"
|
echo "/etc/shorewall6-lite/shorewall6-lite.conf installed as /etc/shorewall6-lite/shorewall6-lite.conf.rpmnew"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
if [ -x /sbin/insserv ]; then
|
if [ -x /sbin/insserv ]; then
|
||||||
/sbin/insserv -r /etc/init.d/shorewall-lite
|
/sbin/insserv -r /etc/init.d/shorewall6-lite
|
||||||
elif [ -x /sbin/chkconfig ]; then
|
elif [ -x /sbin/chkconfig ]; then
|
||||||
/sbin/chkconfig --del shorewall-lite
|
/sbin/chkconfig --del shorewall6-lite
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%attr(0755,root,root) %dir /etc/shorewall-lite
|
%attr(0755,root,root) %dir /etc/shorewall6-lite
|
||||||
%attr(0644,root,root) %config(noreplace) /etc/shorewall-lite/shorewall-lite.conf
|
%attr(0644,root,root) %config(noreplace) /etc/shorewall6-lite/shorewall6-lite.conf
|
||||||
%attr(0644,root,root) /etc/shorewall-lite/Makefile
|
%attr(0644,root,root) /etc/shorewall6-lite/Makefile
|
||||||
%attr(0544,root,root) /etc/init.d/shorewall-lite
|
%attr(0544,root,root) /etc/init.d/shorewall6-lite
|
||||||
%attr(0755,root,root) %dir /usr/share/shorewall-lite
|
%attr(0755,root,root) %dir /usr/share/shorewall6-lite
|
||||||
%attr(0700,root,root) %dir /var/lib/shorewall-lite
|
%attr(0700,root,root) %dir /var/lib/shorewall6-lite
|
||||||
|
|
||||||
%attr(0755,root,root) /sbin/shorewall-lite
|
%attr(0755,root,root) /sbin/shorewall6-lite
|
||||||
|
|
||||||
%attr(0644,root,root) /usr/share/shorewall-lite/version
|
%attr(0644,root,root) /usr/share/shorewall6-lite/version
|
||||||
%attr(0644,root,root) /usr/share/shorewall-lite/configpath
|
%attr(0644,root,root) /usr/share/shorewall6-lite/configpath
|
||||||
%attr(- ,root,root) /usr/share/shorewall-lite/functions
|
%attr(- ,root,root) /usr/share/shorewall6-lite/functions
|
||||||
%attr(0644,root,root) /usr/share/shorewall-lite/lib.base
|
%attr(0644,root,root) /usr/share/shorewall6-lite/lib.base
|
||||||
%attr(0644,root,root) /usr/share/shorewall-lite/lib.cli
|
%attr(0644,root,root) /usr/share/shorewall6-lite/lib.cli
|
||||||
%attr(0644,root,root) /usr/share/shorewall-lite/modules
|
%attr(0644,root,root) /usr/share/shorewall6-lite/modules
|
||||||
%attr(0544,root,root) /usr/share/shorewall-lite/shorecap
|
%attr(0544,root,root) /usr/share/shorewall6-lite/shorecap
|
||||||
%attr(0755,root,root) /usr/share/shorewall-lite/wait4ifup
|
%attr(0755,root,root) /usr/share/shorewall6-lite/wait4ifup
|
||||||
|
|
||||||
%attr(0644,root,root) %{_mandir}/man5/shorewall-lite.conf.5.gz
|
%attr(0644,root,root) %{_mandir}/man8/shorewall6-lite.8.gz
|
||||||
%attr(0644,root,root) %{_mandir}/man5/shorewall-lite-vardir.5.gz
|
|
||||||
|
|
||||||
%attr(0644,root,root) %{_mandir}/man8/shorewall-lite.8.gz
|
|
||||||
|
|
||||||
%doc COPYING changelog.txt releasenotes.txt
|
%doc COPYING changelog.txt releasenotes.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Oct 08 2008 Tom Eastep tom@shorewall.net
|
* Tue Dec 09 2008 Tom Eastep tom@shorewall.net
|
||||||
- Updated to 4.2.1-0base
|
- Initial Version
|
||||||
* Fri Oct 03 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.2.0-0base
|
|
||||||
* Tue Sep 23 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.2.0-0RC4
|
|
||||||
* Mon Sep 15 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.2.0-0RC3
|
|
||||||
* Mon Sep 08 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.2.0-0RC2
|
|
||||||
* Tue Aug 19 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.2.0-0RC1
|
|
||||||
* Thu Jul 03 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.2.0-0Beta3
|
|
||||||
* Mon Jun 02 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.2.0-0Beta2
|
|
||||||
* Wed May 07 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.2.0-0Beta1
|
|
||||||
* Mon Apr 28 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.8-0base
|
|
||||||
* Mon Mar 24 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.7-0base
|
|
||||||
* Thu Mar 13 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.6-0base
|
|
||||||
* Tue Feb 05 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.5-0base
|
|
||||||
* Fri Jan 04 2008 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.4-0base
|
|
||||||
* Wed Dec 12 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.3-0base
|
|
||||||
* Fri Dec 07 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.3-1
|
|
||||||
* Tue Nov 27 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.2-1
|
|
||||||
* Wed Nov 21 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.1-1
|
|
||||||
* Mon Nov 19 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.1.0-1
|
|
||||||
* Thu Nov 15 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.6-1
|
|
||||||
* Sat Nov 10 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.6-0RC3
|
|
||||||
* Wed Nov 07 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.6-0RC2
|
|
||||||
* Thu Oct 25 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.6-0RC1
|
|
||||||
* Tue Oct 03 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.5-1
|
|
||||||
* Wed Sep 05 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.4-1
|
|
||||||
* Mon Aug 13 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.3-1
|
|
||||||
* Thu Aug 09 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.2-1
|
|
||||||
* Sat Jul 21 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.1-1
|
|
||||||
* Wed Jul 11 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-1
|
|
||||||
* Sun Jul 08 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-0RC2
|
|
||||||
* Mon Jul 02 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-0RC1
|
|
||||||
* Sun Jun 24 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-0Beta7
|
|
||||||
* Wed Jun 20 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-0Beta6
|
|
||||||
* Thu Jun 14 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-0Beta5
|
|
||||||
* Fri Jun 08 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-0Beta4
|
|
||||||
* Tue Jun 05 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-0Beta3
|
|
||||||
* Tue May 15 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 4.0.0-0Beta1
|
|
||||||
* Fri May 11 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.9.7-1
|
|
||||||
* Sat May 05 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.9.6-1
|
|
||||||
* Mon Apr 30 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.9.5-1
|
|
||||||
* Mon Apr 23 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.9.4-1
|
|
||||||
* Wed Apr 18 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.9.3-1
|
|
||||||
* Sat Apr 14 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.9.2-1
|
|
||||||
* Sat Apr 07 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.9.1-1
|
|
||||||
* Thu Mar 15 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.4.1-1
|
|
||||||
* Sat Mar 10 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.4.0-1
|
|
||||||
* Sun Feb 25 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.4.0-0RC3
|
|
||||||
* Sun Feb 04 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.4.0-0RC2
|
|
||||||
* Wed Jan 24 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.4.0-0RC1
|
|
||||||
* Mon Jan 22 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.4.0-0Beta3
|
|
||||||
* Wed Jan 03 2007 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.4.0-0Beta2
|
|
||||||
- Handle rename of shorewall.conf
|
|
||||||
* Thu Dec 14 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.4.0-0Beta1
|
|
||||||
* Sat Nov 25 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Added shorewall-exclusion(5)
|
|
||||||
- Updated to 3.3.6-1
|
|
||||||
* Sun Nov 19 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.3.5-1
|
|
||||||
* Sun Oct 29 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.3.4-1
|
|
||||||
* Mon Oct 16 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.3.3-1
|
|
||||||
* Sat Sep 30 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.3.2-1
|
|
||||||
* Wed Aug 30 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.3.1-1
|
|
||||||
* Wed Aug 09 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.3.0-1
|
|
||||||
* Wed Aug 09 2006 Tom Eastep tom@shorewall.net
|
|
||||||
- Updated to 3.3.0-1
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Script to back uninstall Shoreline Firewall
|
# Script to back uninstall Shoreline Firewall 6 Lite
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
@ -26,7 +26,7 @@
|
|||||||
# You may only use this script to uninstall the version
|
# You may only use this script to uninstall the version
|
||||||
# shown below. Simply run this script to remove Shorewall Firewall
|
# shown below. Simply run this script to remove Shorewall Firewall
|
||||||
|
|
||||||
VERSION=4.2.1
|
VERSION=4.3.0
|
||||||
|
|
||||||
usage() # $1 = exit status
|
usage() # $1 = exit status
|
||||||
{
|
{
|
||||||
@ -40,18 +40,6 @@ qt()
|
|||||||
"$@" >/dev/null 2>&1
|
"$@" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
restore_file() # $1 = file to restore
|
|
||||||
{
|
|
||||||
if [ -f ${1}-shorewall.bkout ]; then
|
|
||||||
if (mv -f ${1}-shorewall-lite.bkout $1); then
|
|
||||||
echo
|
|
||||||
echo "$1 restored"
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
remove_file() # $1 = file to restore
|
remove_file() # $1 = file to restore
|
||||||
{
|
{
|
||||||
if [ -f $1 -o -L $1 ] ; then
|
if [ -f $1 -o -L $1 ] ; then
|
||||||
@ -60,8 +48,8 @@ remove_file() # $1 = file to restore
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f /usr/share/shorewall-lite/version ]; then
|
if [ -f /usr/share/shorewall6-lite/version ]; then
|
||||||
INSTALLED_VERSION="$(cat /usr/share/shorewall-lite/version)"
|
INSTALLED_VERSION="$(cat /usr/share/shorewall6-lite/version)"
|
||||||
if [ "$INSTALLED_VERSION" != "$VERSION" ]; then
|
if [ "$INSTALLED_VERSION" != "$VERSION" ]; then
|
||||||
echo "WARNING: Shorewall Lite Version $INSTALLED_VERSION is installed"
|
echo "WARNING: Shorewall Lite Version $INSTALLED_VERSION is installed"
|
||||||
echo " and this is the $VERSION uninstaller."
|
echo " and this is the $VERSION uninstaller."
|
||||||
@ -74,14 +62,14 @@ fi
|
|||||||
|
|
||||||
echo "Uninstalling Shorewall Lite $VERSION"
|
echo "Uninstalling Shorewall Lite $VERSION"
|
||||||
|
|
||||||
if qt iptables -L shorewall -n && [ ! -f /sbin/shorewall ]; then
|
if qt ip6tables -L shorewall -n && [ ! -f /sbin/shorewall6 ]; then
|
||||||
/sbin/shorewall-lite clear
|
/sbin/shorewall6-lite clear
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -L /usr/share/shorewall-lite/init ]; then
|
if [ -L /usr/share/shorewall6-lite/init ]; then
|
||||||
FIREWALL=$(ls -l /usr/share/shorewall-lite/init | sed 's/^.*> //')
|
FIREWALL=$(ls -l /usr/share/shorewall6-lite/init | sed 's/^.*> //')
|
||||||
else
|
else
|
||||||
FIREWALL=/etc/init.d/shorewall-lite
|
FIREWALL=/etc/init.d/shorewall6-lite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$FIREWALL" ]; then
|
if [ -n "$FIREWALL" ]; then
|
||||||
@ -97,16 +85,16 @@ if [ -n "$FIREWALL" ]; then
|
|||||||
rm -f ${FIREWALL}-*.bkout
|
rm -f ${FIREWALL}-*.bkout
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f /sbin/shorewall-lite
|
rm -f /sbin/shorewall6-lite
|
||||||
rm -f /sbin/shorewall-lite-*.bkout
|
rm -f /sbin/shorewall6-lite-*.bkout
|
||||||
|
|
||||||
rm -rf /etc/shorewall-lite
|
rm -rf /etc/shorewall6-lite
|
||||||
rm -rf /etc/shorewall-lite-*.bkout
|
rm -rf /etc/shorewall6-lite-*.bkout
|
||||||
rm -rf /var/lib/shorewall-lite
|
rm -rf /var/lib/shorewall6-lite
|
||||||
rm -rf /var/lib/shorewall-lite-*.bkout
|
rm -rf /var/lib/shorewall6-lite-*.bkout
|
||||||
rm -rf /usr/share/shorewall-lite
|
rm -rf /usr/share/shorewall6-lite
|
||||||
rm -rf /usr/share/shorewall-lite-*.bkout
|
rm -rf /usr/share/shorewall6-lite-*.bkout
|
||||||
|
|
||||||
echo "Shorewall Uninstalled"
|
echo "Shorewall6 Lite Uninstalled"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: shorewall
|
# Provides: shorewall6
|
||||||
# Required-Start: $network
|
# Required-Start: $network
|
||||||
# Required-Stop: $network
|
# Required-Stop: $network
|
||||||
# Default-Start: S
|
# Default-Start: S
|
||||||
# Default-Stop: 0 6
|
# Default-Stop: 0 6
|
||||||
# Short-Description: Configure the firewall at boot time
|
# Short-Description: Configure the firewall at boot time
|
||||||
# Description: Configure the firewall according to the rules specified in
|
# Description: Configure the firewall according to the rules specified in
|
||||||
# /etc/shorewall
|
# /etc/shorewall6
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SRWL=/sbin/shorewall
|
SRWL=/sbin/shorewall6
|
||||||
SRWL_OPTS="-tvv"
|
SRWL_OPTS="-tvv"
|
||||||
WAIT_FOR_IFUP=/usr/share/shorewall/wait4ifup
|
WAIT_FOR_IFUP=/usr/share/shorewall/wait4ifup
|
||||||
# Note, set INITLOG to /dev/null if you do not want to
|
# Note, set INITLOG to /dev/null if you do not want to
|
||||||
@ -28,7 +28,7 @@ test -n $INITLOG || {
|
|||||||
|
|
||||||
if [ "$(id -u)" != "0" ]
|
if [ "$(id -u)" != "0" ]
|
||||||
then
|
then
|
||||||
echo "You must be root to start, stop or restart \"Shorewall firewall\"."
|
echo "You must be root to start, stop or restart \"Shorewall6 firewall\"."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -49,14 +49,14 @@ not_configured () {
|
|||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Please read about Debian specific customization in"
|
echo "Please read about Debian specific customization in"
|
||||||
echo "/usr/share/doc/shorewall-common/README.Debian.gz."
|
echo "/usr/share/doc/shorewall6/README.Debian.gz."
|
||||||
fi
|
fi
|
||||||
echo "#################"
|
echo "#################"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# check if shorewall is configured or not
|
# check if shorewall is configured or not
|
||||||
if [ -f "/etc/default/shorewall" ]
|
if [ -f "/etc/default/shorewall6" ]
|
||||||
then
|
then
|
||||||
. /etc/default/shorewall
|
. /etc/default/shorewall
|
||||||
SRWL_OPTS="$SRWL_OPTS $OPTIONS"
|
SRWL_OPTS="$SRWL_OPTS $OPTIONS"
|
||||||
@ -80,49 +80,49 @@ wait_for_pppd () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# start the firewall
|
# start the firewall
|
||||||
shorewall_start () {
|
shorewall6_start () {
|
||||||
echo -n "Starting \"Shorewall firewall\": "
|
echo -n "Starting \"Shorewall6 firewall\": "
|
||||||
wait_for_pppd
|
wait_for_pppd
|
||||||
$SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# stop the firewall
|
# stop the firewall
|
||||||
shorewall_stop () {
|
shorewall6_stop () {
|
||||||
echo -n "Stopping \"Shorewall firewall\": "
|
echo -n "Stopping \"Shorewall firewall\": "
|
||||||
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# restart the firewall
|
# restart the firewall
|
||||||
shorewall_restart () {
|
shorewall6_restart () {
|
||||||
echo -n "Restarting \"Shorewall firewall\": "
|
echo -n "Restarting \"Shorewall6 firewall\": "
|
||||||
$SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# refresh the firewall
|
# refresh the firewall
|
||||||
shorewall_refresh () {
|
shorewall6_refresh () {
|
||||||
echo -n "Refreshing \"Shorewall firewall\": "
|
echo -n "Refreshing \"Shorewall6 firewall\": "
|
||||||
$SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
$SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
shorewall_start
|
shorewall6_start
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
shorewall_stop
|
shorewall6_stop
|
||||||
;;
|
;;
|
||||||
refresh)
|
refresh)
|
||||||
shorewall_refresh
|
shorewall6_refresh
|
||||||
;;
|
;;
|
||||||
force-reload|restart)
|
force-reload|restart)
|
||||||
shorewall_restart
|
shorewall6_restart
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/shorewall {start|stop|refresh|restart|force-reload}"
|
echo "Usage: /etc/init.d/shorewall6 {start|stop|refresh|restart|force-reload}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
RCDLINKS="2,S41 3,S41 6,K41"
|
RCDLINKS="2,S41 3,S41 6,K41"
|
||||||
#
|
#
|
||||||
# The Shoreline Firewall (Shorewall) Packet Filtering Firewall - V4.2
|
# The Shoreline Firewall (Shorewall6) Packet Filtering Firewall - V4.4
|
||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
@ -29,25 +29,25 @@ RCDLINKS="2,S41 3,S41 6,K41"
|
|||||||
#
|
#
|
||||||
# Commands are:
|
# Commands are:
|
||||||
#
|
#
|
||||||
# shorewall start Starts the firewall
|
# shorewall6 start Starts the firewall
|
||||||
# shorewall restart Restarts the firewall
|
# shorewall6 restart Restarts the firewall
|
||||||
# shorewall reload Reload the firewall
|
# shorewall6 reload Reload the firewall
|
||||||
# (same as restart)
|
# (same as restart)
|
||||||
# shorewall stop Stops the firewall
|
# shorewall6 stop Stops the firewall
|
||||||
# shorewall status Displays firewall status
|
# shorewall6 status Displays firewall status
|
||||||
#
|
#
|
||||||
|
|
||||||
# chkconfig: 2345 25 90
|
# chkconfig: 2345 25 90
|
||||||
# description: Packet filtering firewall
|
# description: Packet filtering firewall
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: shorewall
|
# Provides: shorewall6
|
||||||
# Required-Start: $local_fs $remote_fs $syslog
|
# Required-Start: $local_fs $remote_fs $syslog
|
||||||
# Should-Start: VMware $time $named
|
# Should-Start: VMware $time $named
|
||||||
# Required-Stop:
|
# Required-Stop:
|
||||||
# Default-Start: 2 3 5
|
# Default-Start: 2 3 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Description: starts and stops the shorewall firewall
|
# Description: starts and stops the shorewall6 firewall
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -62,10 +62,10 @@ usage() {
|
|||||||
# Get startup options (override default)
|
# Get startup options (override default)
|
||||||
################################################################################
|
################################################################################
|
||||||
OPTIONS="-v0"
|
OPTIONS="-v0"
|
||||||
if [ -f /etc/sysconfig/shorewall ]; then
|
if [ -f /etc/sysconfig/shorewall6 ]; then
|
||||||
. /etc/sysconfig/shorewall
|
. /etc/sysconfig/shorewall6
|
||||||
elif [ -f /etc/default/shorewall ] ; then
|
elif [ -f /etc/default/shorewall6 ] ; then
|
||||||
. /etc/default/shorewall
|
. /etc/default/shorewall6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -75,14 +75,14 @@ command="$1"
|
|||||||
|
|
||||||
case "$command" in
|
case "$command" in
|
||||||
start|restart|stop)
|
start|restart|stop)
|
||||||
exec /sbin/shorewall $OPTIONS $@
|
exec /sbin/shorewall6 $OPTIONS $@
|
||||||
;;
|
;;
|
||||||
stop|restart|status)
|
stop|restart|status)
|
||||||
exec /sbin/shorewall $@
|
exec /sbin/shorewall6 $@
|
||||||
;;
|
;;
|
||||||
reload)
|
reload)
|
||||||
shift
|
shift
|
||||||
exec /sbin/shorewall $OPTIONS restart $@
|
exec /sbin/shorewall6 $OPTIONS restart $@
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
|
Loading…
Reference in New Issue
Block a user