Move 4.2.4.1 changes to trunk

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9214 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-12-31 18:08:36 +00:00
parent fda4582e7b
commit dc65849d65
7 changed files with 41 additions and 32 deletions

View File

@ -788,7 +788,14 @@ setup_routing_and_traffic_shaping
if [ $COMMAND = restore ]; then if [ $COMMAND = restore ]; then
iptables_save_file=${VARDIR}/$(basename $0)-iptables iptables_save_file=${VARDIR}/$(basename $0)-iptables
if [ -f $iptables_save_file ]; then if [ -f $iptables_save_file ]; then
cat $iptables_save_file | $IPTABLES_RESTORE # Use this nonsensical form to appease SELinux EOF
if ( $family == F_IPV4 ) {
emit ' cat $iptables_save_file | $IPTABLES_RESTORE # Use this nonsensical form to appease SELinux'
} else {
emit ' cat $iptables_save_file | $IP6TABLES_RESTORE # Use this nonsensical form to appease SELinux'
}
emit<<'EOF';
else else
fatal_error "$iptables_save_file does not exist" fatal_error "$iptables_save_file does not exist"
fi fi

View File

@ -1,26 +1,26 @@
#!/bin/bash #!/bin/bash
OPTIONS="-f" OPTIONS=""
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
# if you want to override options, do so in /etc/sysconfig/shorewall or # if you want to override options, do so in /etc/sysconfig/shorewall6 or
# in /etc/default/shorewall -- # in /etc/default/shorewall6 --
# i strongly encourage you use the latter, since /etc/sysconfig/ does not exist. # i strongly encourage you use the latter, since /etc/sysconfig/ does not exist.
. /etc/rc.conf . /etc/rc.conf
. /etc/rc.d/functions . /etc/rc.d/functions
DAEMON_NAME="shorewall" # of course shorewall is NOT a deamon. DAEMON_NAME="shorewall6" # of course shorewall6 is NOT a deamon.
case "$1" in case "$1" in
start) start)
stat_busy "Starting $DAEMON_NAME" stat_busy "Starting $DAEMON_NAME"
/sbin/shorewall-lite $OPTIONS start &>/dev/null /sbin/shorewall6-lite $OPTIONS start &>/dev/null
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
stat_fail stat_fail
else else
@ -32,7 +32,7 @@ case "$1" in
stop) stop)
stat_busy "Stopping $DAEMON_NAME" stat_busy "Stopping $DAEMON_NAME"
/sbin/shorewall-lite stop &>/dev/null /sbin/shorewall6-lite stop &>/dev/null
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
stat_fail stat_fail
else else
@ -43,7 +43,7 @@ case "$1" in
restart|reload) restart|reload)
stat_busy "Restarting $DAEMON_NAME" stat_busy "Restarting $DAEMON_NAME"
/sbin/shorewall-lite restart &>/dev/null /sbin/shorewall6-lite restart &>/dev/null
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
stat_fail stat_fail
else else

View File

@ -57,15 +57,15 @@ not_configured () {
# parse the shorewall params file in order to use params in # parse the shorewall params file in order to use params in
# /etc/default/shorewall # /etc/default/shorewall
if [ -f "/etc/shorewall-lite/params" ] if [ -f "/etc/shorewall6-lite/params" ]
then then
. /etc/shorewall-lite/params . /etc/shorewall6-lite/params
fi fi
# check if shorewall is configured or not # check if shorewall is configured or not
if [ -f "/etc/default/shorewall6-lite" ] if [ -f "/etc/default/shorewall6-lite" ]
then then
. /etc/default/shorewall-lite . /etc/default/shorewall6-lite
SRWL_OPTS="$SRWL_OPTS $OPTIONS" SRWL_OPTS="$SRWL_OPTS $OPTIONS"
if [ "$startup" != "1" ] if [ "$startup" != "1" ]
then then

View File

@ -2,25 +2,25 @@
OPTIONS="-f" OPTIONS="-f"
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
# if you want to override options, do so in /etc/sysconfig/shorewall or # if you want to override options, do so in /etc/sysconfig/shorewall6 or
# in /etc/default/shorewall -- # in /etc/default/shorewall6 --
# i strongly encourage you use the latter, since /etc/sysconfig/ does not exist. # i strongly encourage you use the latter, since /etc/sysconfig/ does not exist.
. /etc/rc.conf . /etc/rc.conf
. /etc/rc.d/functions . /etc/rc.d/functions
DAEMON_NAME="shorewall" # of course shorewall is NOT a deamon. DAEMON_NAME="shorewall6" # of course shorewall6 is NOT a deamon.
case "$1" in case "$1" in
start) start)
stat_busy "Starting $DAEMON_NAME" stat_busy "Starting $DAEMON_NAME"
/sbin/shorewall $OPTIONS start &>/dev/null /sbin/shorewall6 $OPTIONS start &>/dev/null
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
stat_fail stat_fail
else else
@ -32,7 +32,7 @@ case "$1" in
stop) stop)
stat_busy "Stopping $DAEMON_NAME" stat_busy "Stopping $DAEMON_NAME"
/sbin/shorewall stop &>/dev/null /sbin/shorewall6 stop &>/dev/null
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
stat_fail stat_fail
else else
@ -43,7 +43,7 @@ case "$1" in
restart|reload) restart|reload)
stat_busy "Restarting $DAEMON_NAME" stat_busy "Restarting $DAEMON_NAME"
/sbin/shorewall restart &>/dev/null /sbin/shorewall6 restart &>/dev/null
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
stat_fail stat_fail
else else

View File

@ -58,7 +58,7 @@ not_configured () {
# check if shorewall is configured or not # check if shorewall is configured or not
if [ -f "/etc/default/shorewall6" ] if [ -f "/etc/default/shorewall6" ]
then then
. /etc/default/shorewall . /etc/default/shorewall6
SRWL_OPTS="$SRWL_OPTS $OPTIONS" SRWL_OPTS="$SRWL_OPTS $OPTIONS"
if [ "$startup" != "1" ] if [ "$startup" != "1" ]
then then

View File

@ -253,9 +253,9 @@ save_config() {
iptables_save=${IP6TABLES}-save iptables_save=${IP6TABLES}-save
[ -x $iptables_save ] || echo "$ip6tables-save does not exist or is not executable" >&2 [ -x $iptables_save ] || echo "$iptables_save does not exist or is not executable" >&2
if shorewall66_is_started ; then if shorewall6_is_started ; then
[ -d ${VARDIR} ] || mkdir -p ${VARDIR} [ -d ${VARDIR} ] || mkdir -p ${VARDIR}
if [ -f $RESTOREPATH -a ! -x $RESTOREPATH ]; then if [ -f $RESTOREPATH -a ! -x $RESTOREPATH ]; then
@ -268,10 +268,10 @@ save_config() {
*) *)
validate_restorefile RESTOREFILE validate_restorefile RESTOREFILE
if $IPTABLES -L dynamic -n > ${VARDIR}/save; then if $IP6TABLES -L dynamic -n > ${VARDIR}/save; then
echo " Dynamic Rules Saved" echo " Dynamic Rules Saved"
if [ -f ${VARDIR}/.restore ]; then if [ -f ${VARDIR}/.restore ]; then
if $iptables_save | iptablesbug > ${VARDIR}/restore-$$; then if $iptables_save > ${VARDIR}/restore-$$; then
cp -f ${VARDIR}/.restore $RESTOREPATH cp -f ${VARDIR}/.restore $RESTOREPATH
mv -f ${VARDIR}/restore-$$ ${RESTOREPATH}-iptables mv -f ${VARDIR}/restore-$$ ${RESTOREPATH}-iptables
chmod +x $RESTOREPATH chmod +x $RESTOREPATH
@ -755,8 +755,8 @@ restore_command() {
if [ -x $RESTOREPATH ]; then if [ -x $RESTOREPATH ]; then
if [ -x ${RESTOREPATH}-ipsets ] ; then if [ -x ${RESTOREPATH}-ipsets ] ; then
echo Restoring Ipsets... echo Restoring Ipsets...
iptables -F $IP6TABLES -F
iptables -X $IP6TABLES -X
$SHOREWALL_SHELL ${RESTOREPATH}-ipsets $SHOREWALL_SHELL ${RESTOREPATH}-ipsets
fi fi

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<refentry> <refentry>
<refmeta> <refmeta>
<refentrytitle>shorewall-accounting</refentrytitle> <refentrytitle>shorewall-accounting</refentrytitle>