forked from extern/shorewall_code
Fix initialization problem
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6521 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
840f2414bd
commit
1cadf721ae
@ -101,6 +101,10 @@ Other changes in Shorewall 4.0.0 Beta 5.
|
|||||||
Compilation errors cause the compiler to raise an exception via
|
Compilation errors cause the compiler to raise an exception via
|
||||||
die.
|
die.
|
||||||
|
|
||||||
|
Important: Currently, the 'compiler' function may only
|
||||||
|
be called once in a process. I'll work on removing that
|
||||||
|
restriction but that isn't a high priority for me.
|
||||||
|
|
||||||
Migration Considerations:
|
Migration Considerations:
|
||||||
|
|
||||||
1) You cannot simply upgrade your existing Shorewall package. You must
|
1) You cannot simply upgrade your existing Shorewall package. You must
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#
|
#
|
||||||
use strict;
|
use strict;
|
||||||
use lib '/usr/share/shorewall-perl';
|
use lib '/usr/share/shorewall-perl';
|
||||||
use Shorewall::Compiler;
|
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
||||||
sub usage() {
|
sub usage() {
|
||||||
@ -37,7 +36,7 @@ sub usage() {
|
|||||||
#
|
#
|
||||||
Getopt::Long::Configure ('bundling');
|
Getopt::Long::Configure ('bundling');
|
||||||
|
|
||||||
my ( $export , $shorewall_dir, $verbose, $timestamp ) = qw( 0 '' '' '' );
|
my ( $export , $shorewall_dir, $verbose, $timestamp ) = ( 0, '', '', '' );
|
||||||
|
|
||||||
my $result = GetOptions('export' => \$export,
|
my $result = GetOptions('export' => \$export,
|
||||||
'e' => \$export,
|
'e' => \$export,
|
||||||
@ -50,10 +49,13 @@ my $result = GetOptions('export' => \$export,
|
|||||||
|
|
||||||
usage unless $result && @ARGV < 2;
|
usage unless $result && @ARGV < 2;
|
||||||
|
|
||||||
eval {
|
{
|
||||||
|
eval {
|
||||||
|
use Shorewall::Compiler;
|
||||||
configure( $export, $shorewall_dir, $verbose, $timestamp );
|
configure( $export, $shorewall_dir, $verbose, $timestamp );
|
||||||
compiler $ARGV[0];
|
compiler $ARGV[0];
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if ( $@ ) {
|
if ( $@ ) {
|
||||||
print STDERR $@;
|
print STDERR $@;
|
||||||
|
Loading…
Reference in New Issue
Block a user