Add -c to the start command

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-05-24 09:13:02 -07:00
parent 021048379f
commit ee98772349
6 changed files with 39 additions and 8 deletions

View File

@ -1599,7 +1599,10 @@ sub initialize_chain_table()
} }
} }
dont_delete ensure_filter_chain 'AUDIT', 0 if $config{FAKE_AUDIT}; #
# Create these chains early in case they are needed by Policy actions
#
dont_delete new_standard_chain 'AUDIT', 0 if $config{FAKE_AUDIT};
dont_move new_standard_chain 'reject'; dont_move new_standard_chain 'reject';
} }

View File

@ -158,8 +158,8 @@ VI. PROBLEMS CORRECTED AND NEW FEATURES IN PRIOR RELEASES
LEGACY_FASTSTART=No, 'start -f' and 'restart -f' compare with LEGACY_FASTSTART=No, 'start -f' and 'restart -f' compare with
/var/lib/shorewall[6]/firewall. /var/lib/shorewall[6]/firewall.
7) A '-c' (compile) option has been added to the 'restart' 7) A '-c' (compile) option has been added to the 'start' and 'restart'
command in both Shorewall and Shorewall6. It overrides the setting commands in both Shorewall and Shorewall6. It overrides the setting
of AUTOMAKE and unconditionally forces a recompilation of the of AUTOMAKE and unconditionally forces a recompilation of the
configuration. configuration.

View File

@ -464,6 +464,10 @@ start_command() {
g_purge=Yes g_purge=Yes
option=${option%p} option=${option%p}
;; ;;
c*)
AUTOMAKE=
option=${option#c}
;;
*) *)
usage 1 usage 1
;; ;;
@ -1412,7 +1416,7 @@ usage() # $1 = exit status
echo " show tc [ device ]" echo " show tc [ device ]"
echo " show vardir" echo " show vardir"
echo " show zones" echo " show zones"
echo " start [ -f ] [ -n ] [ -p ] [ <directory> ]" echo " start [ -f ] [ -n ] [ -p ] [ -c ] [ <directory> ]"
echo " stop" echo " stop"
echo " status" echo " status"
echo " try <directory> [ <timeout> ]" echo " try <directory> [ <timeout> ]"

View File

@ -465,6 +465,10 @@ start_command() {
g_purge=Yes g_purge=Yes
option=${option%p} option=${option%p}
;; ;;
c*)
AUTOMAKE=
option=${option#c}
;;
*) *)
usage 1 usage 1
;; ;;
@ -1407,7 +1411,7 @@ usage() # $1 = exit status
echo " show tc [ device ]" echo " show tc [ device ]"
echo " show vardir" echo " show vardir"
echo " show zones" echo " show zones"
echo " start [ -f ] [ -n ] [ -p ] [ <directory> ]" echo " start [ -f ] [ -n ] [ -p ] [ -c ] [ <directory> ]"
echo " stop" echo " stop"
echo " status" echo " status"
echo " try <directory> [ <timeout> ]" echo " try <directory> [ <timeout> ]"

View File

@ -573,6 +573,8 @@
<arg><option>-p</option></arg> <arg><option>-p</option></arg>
<arg><option>-c</option></arg>
<arg><replaceable>directory</replaceable></arg> <arg><replaceable>directory</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
@ -1127,7 +1129,9 @@
<para>The <option>-c</option> option was added in Shorewall 4.4.20 <para>The <option>-c</option> option was added in Shorewall 4.4.20
and performs the compilation step unconditionally, overriding the and performs the compilation step unconditionally, overriding the
AUTOMAKE setting in <ulink AUTOMAKE setting in <ulink
url="shorewall.conf.html">shorewall.conf</ulink>(5).</para> url="shorewall.conf.html">shorewall.conf</ulink>(5). When both
<option>-f</option> and <option>-c</option>are present, the result
is determined by the option that appears last.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -1439,6 +1443,13 @@
<para>The <option>-p</option> option causes the connection tracking <para>The <option>-p</option> option causes the connection tracking
table to be flushed; the <command>conntrack</command> utility must table to be flushed; the <command>conntrack</command> utility must
be installed to use this option.</para> be installed to use this option.</para>
<para>The <option>-c</option> option was added in Shorewall 4.4.20
and performs the compilation step unconditionally, overriding the
AUTOMAKE setting in <ulink
url="shorewall.conf.html">shorewall.conf</ulink>(5). When both
<option>-f</option> and <option>-c</option>are present, the result
is determined by the option that appears last.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -302,6 +302,8 @@
<arg><option>-f</option></arg> <arg><option>-f</option></arg>
<arg><option>-c</option></arg>
<arg><replaceable>directory</replaceable></arg> <arg><replaceable>directory</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
@ -457,7 +459,7 @@
<arg><option>-n</option></arg> <arg><option>-n</option></arg>
<arg><option>-f</option></arg> <arg><option>-f</option><arg><option>-c</option></arg></arg>
<arg><replaceable>directory</replaceable></arg> <arg><replaceable>directory</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
@ -1201,6 +1203,13 @@
<para>The <option>-n</option> option causes Shorewall6 to avoid <para>The <option>-n</option> option causes Shorewall6 to avoid
updating the routing table(s).</para> updating the routing table(s).</para>
<para>The <option>-c</option> option was added in Shorewall 4.4.20
and performs the compilation step unconditionally, overriding the
AUTOMAKE setting in <ulink
url="shorewall6.conf.html">shorewall6.conf</ulink>(5). When both
<option>-f</option> and <option>-c </option>are present, the result
is determined by the option that appears last.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>