mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-18 11:38:14 +01:00
Allow compiler to be specified on the run-line
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5912 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
5f04c869ab
commit
8df919728b
@ -1798,20 +1798,6 @@ do_initialize() {
|
||||
#
|
||||
ensure_config_path
|
||||
|
||||
if [ $PROGRAM = compiler ]; then
|
||||
case "${SHOREWALL_COMPILER:=shell}" in
|
||||
perl)
|
||||
export CONFIG_PATH;
|
||||
return;
|
||||
;;
|
||||
shell)
|
||||
;;
|
||||
*)
|
||||
startup_error "Invalid value ($SHOREWALL_COMPILER) for SHOREWALL_COMPILER"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
TMP_DIR=$(mktempdir)
|
||||
|
||||
[ -n "$TMP_DIR" ] && chmod 700 $TMP_DIR || \
|
||||
|
@ -244,7 +244,9 @@ compiler() {
|
||||
|
||||
set +a
|
||||
|
||||
if [ -x $sc ]; then
|
||||
if [ -n "$SHOREWALL_COMPILER" ]; then
|
||||
compiler="$SHOREWALL_COMPILER"
|
||||
elif [ -x $sc ]; then
|
||||
if [ -x $pc ]; then
|
||||
compiler=
|
||||
else
|
||||
@ -450,10 +452,18 @@ compile_command() {
|
||||
EXPORT=Yes
|
||||
option=${option#e}
|
||||
;;
|
||||
p*)
|
||||
P*)
|
||||
PROFILE=Yes
|
||||
option=${option#P}
|
||||
;;
|
||||
p*)
|
||||
SHOREWALL_COMPILER=perl
|
||||
option=${option#p}
|
||||
;;
|
||||
s*)
|
||||
SHOREWALL_COMPILER=shell
|
||||
option=${option#s}
|
||||
;;
|
||||
d*)
|
||||
DEBUG=Yes;
|
||||
option=${option#d}
|
||||
@ -529,10 +539,18 @@ check_command() {
|
||||
EXPORT=Yes
|
||||
option=${option#e}
|
||||
;;
|
||||
p*)
|
||||
P*)
|
||||
PROFILE=Yes
|
||||
option=${option#P}
|
||||
;;
|
||||
p*)
|
||||
SHOREWALL_COMPILER=perl
|
||||
option=${option#p}
|
||||
;;
|
||||
s*)
|
||||
SHOREWALL_COMPILER=shell
|
||||
option=${option#s}
|
||||
;;
|
||||
d*)
|
||||
DEBUG=Yes;
|
||||
option=${option#d}
|
||||
@ -601,6 +619,14 @@ restart_command() {
|
||||
NOROUTES=Yes
|
||||
option=${option#n}
|
||||
;;
|
||||
p*)
|
||||
SHOREWALL_COMPILER=perl
|
||||
option=${option#p}
|
||||
;;
|
||||
s*)
|
||||
SHOREWALL_COMPILER=shell
|
||||
option=${option#s}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
@ -678,6 +704,14 @@ refresh_command() {
|
||||
finished=1
|
||||
option=
|
||||
;;
|
||||
p*)
|
||||
SHOREWALL_COMPILER=perl
|
||||
option=${option#p}
|
||||
;;
|
||||
s*)
|
||||
SHOREWALL_COMPILER=shell
|
||||
option=${option#s}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
@ -755,6 +789,14 @@ safe_commands() {
|
||||
NOROUTES=Yes
|
||||
option=${option#n}
|
||||
;;
|
||||
p*)
|
||||
SHOREWALL_COMPILER=perl
|
||||
option=${option#p}
|
||||
;;
|
||||
s*)
|
||||
SHOREWALL_COMPILER=shell
|
||||
option=${option#s}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
@ -899,6 +941,14 @@ try_command() {
|
||||
NOROUTES=Yes
|
||||
option=${option#n}
|
||||
;;
|
||||
p*)
|
||||
SHOREWALL_COMPILER=perl
|
||||
option=${option#p}
|
||||
;;
|
||||
s*)
|
||||
SHOREWALL_COMPILER=shell
|
||||
option=${option#s}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
|
@ -5673,13 +5673,13 @@ case "$COMMAND" in
|
||||
check)
|
||||
[ $# -ne 1 ] && usage
|
||||
do_initialize
|
||||
[ "$SHOREWALL_COMPILER" = perl ] && exec perl $debug /usr/share/shorewall-perl/compiler.pl || compile_firewall
|
||||
compile_firewall
|
||||
;;
|
||||
|
||||
compile)
|
||||
[ $# -ne 2 ] && usage
|
||||
do_initialize
|
||||
[ "$SHOREWALL_COMPILER" = perl ] && exec perl $debug /usr/share/shorewall-perl/compiler.pl $2 || compile_firewall $2
|
||||
compile_firewall $2
|
||||
;;
|
||||
|
||||
call)
|
||||
|
@ -120,6 +120,30 @@
|
||||
Shorewall.</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Prerequisites for using the Shorewall Version 4 Perl-based
|
||||
Compiler</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Perl (I use Perl 5.8.8 but other versions should work
|
||||
fine)</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Perl Cwd Module</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Perl File::Basename Module</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Perl File::Temp Module</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Incompatibilities Introduced in the Shorewall Version 4 Perl-based
|
||||
Compiler</title>
|
||||
@ -376,30 +400,6 @@ fi</programlisting>
|
||||
</orderedlist>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Prerequisites for using the Shorewall Version 4 Perl-based
|
||||
Compiler</title>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Perl (I use Perl 5.8.8 but other versions should work
|
||||
fine)</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Perl Cwd Module</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Perl File::Basename Module</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Perl File::Temp Module</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Compiler Selection</title>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user