Enhancements to the 'refresh' command.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-05-02 13:48:18 -07:00
parent 894931731b
commit 15aa1dae62
3 changed files with 56 additions and 3 deletions

View File

@ -972,6 +972,27 @@ refresh_command() {
finished=1
option=
;;
d*)
g_debug=Yes
option=${option#d}
;;
n*)
g_noroutes=Yes
option=${option#n}
;;
T*)
g_confess=Yes
option=${option#T}
;;
D)
if [ $# -gt 1 ]; then
g_shorewalldir="$2"
option=
shift
else
fatal_error "ERROR: the -D option requires a directory name"
fi
;;
*)
usage 1
;;
@ -1579,7 +1600,7 @@ usage() # $1 = exit status
echo " noiptrace <ip6tables match expression>"
fi
echo " refresh [ <chain>... ]"
echo " refresh [ -d ] [ -n ] [ -T ] [ -D <directory> ] [ <chain>... ]"
echo " reject <address> ..."
echo " reload [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ <directory> ] <system>"
echo " reset [ <chain> ... ]"

View File

@ -351,7 +351,9 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>refresh</option><arg
<arg
choice="plain"><option>refresh</option><arg><option>-n</option></arg><arg><option>-d</option></arg><arg><option>-T</option></arg><arg>-<option>D</option>
<replaceable>directory</replaceable> </arg><arg
rep="repeat"><replaceable>chain</replaceable></arg></arg>
</cmdsynopsis>
@ -1125,6 +1127,20 @@
list or until an entry in the list names another table. Built-in
chains such as FORWARD may not be refreshed.</para>
<para>The <option>-n</option> option was added in Shorewall 4.5.3
causes Shorewall to avoid updating the routing table(s).</para>
<para>The <option>-d </option>option was added in Shorewall 4.5.3
causes the compiler to run under the Perl debugger.</para>
<para>The <option>-T</option> option was added in Shorewall 4.5.3
and causes a Perl stack trace to be included with each
compiler-generated error and warning message.</para>
<para>The -<option>D</option> option was added in Shorewall 4.5.3
and causes Shorewall to look in the given
<emphasis>directory</emphasis> first for configuration files.</para>
<para>Example:<programlisting><command>shorewall refresh net2fw nat:net_dnat</command> #Refresh the 'net2loc' chain in the filter table and the 'net_dnat' chain in the nat table</programlisting></para>
<para>The <emphasis role="bold">refresh</emphasis> command has

View File

@ -290,7 +290,9 @@
<arg>-<replaceable>options</replaceable></arg>
<arg choice="plain"><option>refresh</option><arg
<arg
choice="plain"><option>refresh</option><arg><option>-n</option></arg><arg><option>-d</option></arg><arg><option>-T</option></arg><arg>-<option>D</option>
<replaceable>directory</replaceable> </arg><arg
rep="repeat"><replaceable>chain</replaceable></arg></arg>
</cmdsynopsis>
@ -997,6 +999,20 @@
list or until an entry in the list names another table. Built-in
chains such as FORWARD may not be refreshed.</para>
<para>The <option>-n</option> option was added in Shorewall 4.5.3
causes Shorewall to avoid updating the routing table(s).</para>
<para>The <option>-d </option>option was added in Shorewall 4.5.3
causes the compiler to run under the Perl debugger.</para>
<para>The <option>-T</option> option was added in Shorewall 4.5.3
and causes a Perl stack trace to be included with each
compiler-generated error and warning message.</para>
<para>The -<option>D</option> option was added in Shorewall 4.5.3
and causes Shorewall to look in the given
<emphasis>directory</emphasis> first for configuration files.</para>
<para>Example:<programlisting><command>shorewall6 refresh net2fw nat:net_dnat</command> #Refresh the 'net2loc' chain in the filter table and the 'net_dnat' chain in the nat table</programlisting></para>
</listitem>
</varlistentry>