mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 06:10:42 +01:00
Apply the Slackware changes to trunk
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9485 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
70b817fb4c
commit
0e8d2452d0
66
Shorewall-common/init.slackware.firewall.sh
Executable file
66
Shorewall-common/init.slackware.firewall.sh
Executable file
@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/rc.firewall: Shoreline Firewall (Shorewall) initialization script.
|
||||
#
|
||||
# This script starts both the IPv4 and IPv6 rules of shorewall if the respective
|
||||
# initialization scripts (rc.shorewall and rc.shorewall6) are present
|
||||
#
|
||||
# http://rafb.net/p/k0OiyI67.html
|
||||
|
||||
start() {
|
||||
if [ -x /etc/rc.d/rc.shorewall ]; then
|
||||
/etc/rc.d/rc.shorewall start
|
||||
fi
|
||||
if [ -x /etc/rc.d/rc.shorewall6 ]; then
|
||||
/etc/rc.d/rc.shorewall6 start
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ -x /etc/rc.d/rc.shorewall ]; then
|
||||
/etc/rc.d/rc.shorewall stop
|
||||
fi
|
||||
if [ -x /etc/rc.d/rc.shorewall6 ]; then
|
||||
/etc/rc.d/rc.shorewall6 stop
|
||||
fi
|
||||
}
|
||||
|
||||
restart() {
|
||||
if [ -x /etc/rc.d/rc.shorewall ]; then
|
||||
/etc/rc.d/rc.shorewall restart
|
||||
fi
|
||||
if [ -x /etc/rc.d/rc.shorewall6 ]; then
|
||||
/etc/rc.d/rc.shorewall6 restart
|
||||
fi
|
||||
}
|
||||
|
||||
status() {
|
||||
if [ -x /etc/rc.d/rc.shorewall ]; then
|
||||
/etc/rc.d/rc.shorewall status
|
||||
fi
|
||||
if [ -x /etc/rc.d/rc.shorewall6 ]; then
|
||||
/etc/rc.d/rc.shorewall6 status
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
'start')
|
||||
start
|
||||
;;
|
||||
'stop')
|
||||
stop
|
||||
;;
|
||||
'restart')
|
||||
restart
|
||||
;;
|
||||
'status')
|
||||
status
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# All done
|
59
Shorewall-common/init.slackware.shorewall.sh
Executable file
59
Shorewall-common/init.slackware.shorewall.sh
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/rc.shorewall: start/stop/restart IPv4 rules of Shorewall
|
||||
#
|
||||
# This should be started from rc.firewall.
|
||||
# This script only affect the IPv4 rules and configuration located
|
||||
# in /etc/shorewall
|
||||
#
|
||||
# http://rafb.net/p/iffZ4d32.html
|
||||
|
||||
OPTIONS=""
|
||||
|
||||
# Use /etc/default shorewall to specify $OPTIONS to run at startup, however this
|
||||
# this might prevent shorewall from starting. use at your own risk
|
||||
if [ -f /etc/default/shorewall ] ; then
|
||||
. /etc/default/shorewall
|
||||
fi
|
||||
|
||||
|
||||
start() {
|
||||
echo "Starting IPv4 shorewall rules..."
|
||||
exec /sbin/shorewall $OPTIONS start
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "Stopping IPv4 shorewall rules..."
|
||||
exec /sbin/shorewall stop
|
||||
}
|
||||
|
||||
restart() {
|
||||
echo "Restarting IPv4 shorewall rules..."
|
||||
exec /sbin/shorewall restart
|
||||
}
|
||||
|
||||
status() {
|
||||
exec /sbin/shorewall status
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
start
|
||||
;;
|
||||
'stop')
|
||||
stop
|
||||
;;
|
||||
'reload'|'restart')
|
||||
restart
|
||||
;;
|
||||
'status')
|
||||
status
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 start|stop|reload|restart|status"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# All done
|
@ -22,7 +22,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
|
||||
VERSION=4.2.6
|
||||
VERSION=4.2.7
|
||||
|
||||
usage() # $1 = exit status
|
||||
{
|
||||
@ -151,6 +151,7 @@ fi
|
||||
|
||||
DEBIAN=
|
||||
CYGWIN=
|
||||
MANDIR=${MANDIR:-"/usr/share/man"}
|
||||
|
||||
case $(uname) in
|
||||
CYGWIN*)
|
||||
@ -207,14 +208,16 @@ if [ -n "$PREFIX" ]; then
|
||||
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
|
||||
fi
|
||||
else
|
||||
[ -x /usr/share/shorewall-perl/compiler.pl ] || \
|
||||
[ -x /usr/share/shorewall-shell/compiler -o -x /usr/share/shorewall-perl/compiler.pl ] || \
|
||||
{ echo " ERROR: No Shorewall compiler is installed" >&2; exit 1; }
|
||||
if [ -z "$CYGWIN" ]; then
|
||||
if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
|
||||
DEBIAN=yes
|
||||
elif [ -f /etc/slackware-version ] ; then
|
||||
echo "installing Slackware specific configuration..."
|
||||
DEST="/etc/rc.d"
|
||||
INIT="rc.firewall"
|
||||
MANDIR="/usr/man"
|
||||
SLACKWARE=yes
|
||||
elif [ -f /etc/arch-release ] ; then
|
||||
DEST="/etc/rc.d"
|
||||
INIT="shorewall"
|
||||
@ -260,6 +263,9 @@ if [ -n "$DEBIAN" ]; then
|
||||
install_file_with_backup init.debian.sh /etc/init.d/shorewall 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
|
||||
elif [ -n "$ARCHLINUX" ]; then
|
||||
install_file_with_backup init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
|
||||
elif [ -n "$SLACKWARE" ]; then
|
||||
install_file_with_backup init.slackware.firewall.sh ${PREFIX}${DEST}/rc.firewall 0644 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
|
||||
install_file_with_backup init.slackware.shorewall.sh ${PREFIX}${DEST}/rc.shorewall 0644 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
|
||||
elif [ -n "$INIT" ]; then
|
||||
install_file_with_backup init.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall-${VERSION}.bkout
|
||||
fi
|
||||
@ -732,14 +738,14 @@ cd manpages
|
||||
|
||||
for f in *.5; do
|
||||
gzip -c $f > $f.gz
|
||||
run_install -D -m 0644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
|
||||
echo "Man page $f.gz installed to /usr/share/man/man5/$f.gz"
|
||||
run_install -D -m 0644 $f.gz ${PREFIX}${MANDIR}/man5/$f.gz
|
||||
echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man5/$f.gz"
|
||||
done
|
||||
|
||||
for f in *.8; do
|
||||
gzip -c $f > $f.gz
|
||||
run_install -D -m 0644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
|
||||
echo "Man page $f.gz installed to /usr/share/man/man8/$f.gz"
|
||||
run_install -D -m 0644 $f.gz ${PREFIX}${MANDIR}/man8/$f.gz
|
||||
echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man8/$f.gz"
|
||||
done
|
||||
|
||||
cd ..
|
||||
|
59
Shorewall6/init.slackware.shorewall6.sh
Executable file
59
Shorewall6/init.slackware.shorewall6.sh
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/rc.shorewall6: start/stop/restart IPv6 rules of Shorewall
|
||||
#
|
||||
# This should be started from rc.firewall.
|
||||
# This script only affect the IPv6 rules and configuration located
|
||||
# in /etc/shorewall6
|
||||
#
|
||||
# http://rafb.net/p/1gsyye11.html
|
||||
|
||||
OPTIONS=""
|
||||
|
||||
# Use /etc/default shorewall6 to specify $OPTIONS to run at startup, however this
|
||||
# this might prevent shorewall6 from starting. use at your own risk
|
||||
if [ -f /etc/default/shorewall6 ] ; then
|
||||
. /etc/default/shorewall6
|
||||
fi
|
||||
|
||||
|
||||
start() {
|
||||
echo "Starting IPv6 shorewall rules..."
|
||||
exec /sbin/shorewall6 $OPTIONS start
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "Stopping IPv6 shorewall rules..."
|
||||
exec /sbin/shorewall6 stop
|
||||
}
|
||||
|
||||
restart() {
|
||||
echo "Restarting IPv6 shorewall rules..."
|
||||
exec /sbin/shorewall6 restart
|
||||
}
|
||||
|
||||
status() {
|
||||
exec /sbin/shorewall6 status
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
start
|
||||
;;
|
||||
'stop')
|
||||
stop
|
||||
;;
|
||||
'reload'|'restart')
|
||||
restart
|
||||
;;
|
||||
'status')
|
||||
status
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 start|stop|reload|restart|status"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# All done
|
@ -151,6 +151,7 @@ fi
|
||||
|
||||
DEBIAN=
|
||||
CYGWIN=
|
||||
MANDIR=$(MANDIR:-"/usr/share/man")
|
||||
|
||||
case $(uname) in
|
||||
CYGWIN*)
|
||||
@ -214,6 +215,7 @@ else
|
||||
DEBIAN=yes
|
||||
elif [ -f /etc/slackware-version ] ; then
|
||||
DEST="/etc/rc.d"
|
||||
SLACKWARE=yes
|
||||
INIT="rc.firewall"
|
||||
elif [ -f /etc/arch-release ] ; then
|
||||
DEST="/etc/rc.d"
|
||||
@ -258,6 +260,8 @@ fi
|
||||
#
|
||||
if [ -n "$DEBIAN" ]; then
|
||||
install_file_with_backup init.debian.sh /etc/init.d/shorewall6 0544 ${PREFIX}/usr/share/shorewall6-${VERSION}.bkout
|
||||
elif [ -n "$SLACKWARE" ]; then
|
||||
install_file_with_backup init.slackware.shorewall6.sh ${PREFIX}${DEST}/rc.shorewall6 0544 ${PREFIX}/usr/share/shorewall6-${VERSION}.bkout
|
||||
elif [ -n "$ARCHLINUX" ]; then
|
||||
install_file_with_backup init.archlinux.sh ${PREFIX}${DEST}/$INIT 0544 ${PREFIX}/usr/share/shorewall6-${VERSION}.bkout
|
||||
elif [ -n "$INIT" ]; then
|
||||
@ -478,7 +482,7 @@ fi
|
||||
#
|
||||
# Install the Notrack file
|
||||
#
|
||||
run_install $OWNERSHIP -m 0644 notrack ${PREFIX}/usr/share/shorewall6/configfiles/notrack
|
||||
run_install $OWNERSHIP -m 0644 notrack ${PREFIX}/usr/share/shorewal6/configfiles/notrack
|
||||
|
||||
if [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall6/notrack ]; then
|
||||
run_install $OWNERSHIP -m 0600 notrack ${PREFIX}/etc/shorewall6/notrack
|
||||
@ -626,14 +630,14 @@ cd manpages
|
||||
|
||||
for f in *.5; do
|
||||
gzip -c $f > $f.gz
|
||||
run_install -D -m 0644 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz
|
||||
echo "Man page $f.gz installed to /usr/share/man/man5/$f.gz"
|
||||
run_install -D -m 0644 $f.gz ${PREFIX}${MANDIR}/man5/$f.gz
|
||||
echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man5/$f.gz"
|
||||
done
|
||||
|
||||
for f in *.8; do
|
||||
gzip -c $f > $f.gz
|
||||
run_install -D -m 0644 $f.gz ${PREFIX}/usr/share/man/man8/$f.gz
|
||||
echo "Man page $f.gz installed to /usr/share/man/man8/$f.gz"
|
||||
run_install -D -m 0644 $f.gz ${PREFIX}${MANDIR}/man/man8/$f.gz
|
||||
echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man8/$f.gz"
|
||||
done
|
||||
|
||||
cd ..
|
||||
|
Loading…
Reference in New Issue
Block a user