mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 09:47:51 +02:00
A couple of tweaks to /sbin/shorewall
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4032 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
df1dbeb4c9
commit
1605f6d9bd
@ -131,12 +131,12 @@ showchain() # $1 = name of chain
|
|||||||
iptablesbug()
|
iptablesbug()
|
||||||
{
|
{
|
||||||
if qt mywhich awk ; then
|
if qt mywhich awk ; then
|
||||||
awk 'BEGIN {sline=""; };\
|
awk 'BEGIN { sline=""; };\
|
||||||
/^-j/ { print sline $0; next };\
|
/^-j/ { print sline $0; next };\
|
||||||
/-m policy.*-j/ { print $0; next };\
|
/-m policy.*-j/ { print $0; next };\
|
||||||
/-m policy/ { sline=$0; next };\
|
/-m policy/ { sline=$0; next };\
|
||||||
/--mask ff/ { sub( /--mask ff/, "--mask 0xff" ) };\
|
/--mask ff/ { sub( /--mask ff/, "--mask 0xff" ) };\
|
||||||
{print ; sline="" }'
|
{ print ; sline="" }'
|
||||||
else
|
else
|
||||||
echo " WARNING: You don't have 'awk' on this system so the output of the save command may be unusable" >&2
|
echo " WARNING: You don't have 'awk' on this system so the output of the save command may be unusable" >&2
|
||||||
cat
|
cat
|
||||||
@ -553,7 +553,7 @@ start_command() {
|
|||||||
#
|
#
|
||||||
iptables -F
|
iptables -F
|
||||||
iptables -X
|
iptables -X
|
||||||
${RESTOREPATH}-ipsets
|
$SHOREWALL_SHELL ${RESTOREPATH}-ipsets
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Restoring Shorewall...
|
echo Restoring Shorewall...
|
||||||
@ -933,11 +933,11 @@ restore_command() {
|
|||||||
echo Restoring Ipsets...
|
echo Restoring Ipsets...
|
||||||
iptables -F
|
iptables -F
|
||||||
iptables -X
|
iptables -X
|
||||||
${RESTOREPATH}-ipsets
|
$SHOREWALL_SHELL ${RESTOREPATH}-ipsets
|
||||||
fi
|
fi
|
||||||
|
|
||||||
progress_message3 "Restoring Shorewall..."
|
progress_message3 "Restoring Shorewall..."
|
||||||
$RESTOREPATH restore && echo "Shorewall restored from /var/lib/shorewall/$RESTOREFILE"
|
$SHOREWALL_SHELL $RESTOREPATH restore && echo "Shorewall restored from /var/lib/shorewall/$RESTOREFILE"
|
||||||
[ -n "$nolock" ] || mutex_off
|
[ -n "$nolock" ] || mutex_off
|
||||||
else
|
else
|
||||||
echo "File /var/lib/shorewall/$RESTOREFILE: file not found"
|
echo "File /var/lib/shorewall/$RESTOREFILE: file not found"
|
||||||
@ -1249,9 +1249,7 @@ COMMAND=$1
|
|||||||
case "$COMMAND" in
|
case "$COMMAND" in
|
||||||
start)
|
start)
|
||||||
shift
|
shift
|
||||||
|
|
||||||
start_command $@
|
start_command $@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
stop|reset|clear|refresh)
|
stop|reset|clear|refresh)
|
||||||
[ $# -ne 1 ] && usage 1
|
[ $# -ne 1 ] && usage 1
|
||||||
@ -1260,21 +1258,15 @@ case "$COMMAND" in
|
|||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
shift
|
shift
|
||||||
|
|
||||||
restart_command $@
|
restart_command $@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
check)
|
check)
|
||||||
shift
|
shift
|
||||||
|
|
||||||
check_command $@
|
check_command $@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
show|list)
|
show|list)
|
||||||
shift
|
shift
|
||||||
|
|
||||||
show_command $@
|
show_command $@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
[ $# -eq 1 ] || usage 1
|
[ $# -eq 1 ] || usage 1
|
||||||
@ -1304,9 +1296,7 @@ case "$COMMAND" in
|
|||||||
;;
|
;;
|
||||||
dump)
|
dump)
|
||||||
shift
|
shift
|
||||||
|
|
||||||
dump_command $@
|
dump_command $@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
hits)
|
hits)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
@ -1593,9 +1583,7 @@ case "$COMMAND" in
|
|||||||
;;
|
;;
|
||||||
restore)
|
restore)
|
||||||
shift
|
shift
|
||||||
|
|
||||||
restore_command $@
|
restore_command $@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
call)
|
call)
|
||||||
[ -n "$debugging" ] && set -x
|
[ -n "$debugging" ] && set -x
|
||||||
|
Loading…
x
Reference in New Issue
Block a user