mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
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
@ -99,7 +99,11 @@ Other changes in Shorewall 4.0.0 Beta 5.
|
||||
configuration is compiled into the named file.
|
||||
|
||||
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:
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
#
|
||||
use strict;
|
||||
use lib '/usr/share/shorewall-perl';
|
||||
use Shorewall::Compiler;
|
||||
use Getopt::Long;
|
||||
|
||||
sub usage() {
|
||||
@ -37,7 +36,7 @@ sub usage() {
|
||||
#
|
||||
Getopt::Long::Configure ('bundling');
|
||||
|
||||
my ( $export , $shorewall_dir, $verbose, $timestamp ) = qw( 0 '' '' '' );
|
||||
my ( $export , $shorewall_dir, $verbose, $timestamp ) = ( 0, '', '', '' );
|
||||
|
||||
my $result = GetOptions('export' => \$export,
|
||||
'e' => \$export,
|
||||
@ -50,10 +49,13 @@ my $result = GetOptions('export' => \$export,
|
||||
|
||||
usage unless $result && @ARGV < 2;
|
||||
|
||||
eval {
|
||||
configure( $export, $shorewall_dir, $verbose, $timestamp );
|
||||
compiler $ARGV[0];
|
||||
};
|
||||
{
|
||||
eval {
|
||||
use Shorewall::Compiler;
|
||||
configure( $export, $shorewall_dir, $verbose, $timestamp );
|
||||
compiler $ARGV[0];
|
||||
};
|
||||
}
|
||||
|
||||
if ( $@ ) {
|
||||
print STDERR $@;
|
||||
|
Loading…
Reference in New Issue
Block a user