mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
Allow compile to STDOUT
This commit is contained in:
parent
e465fea86a
commit
b6090948dd
@ -1084,6 +1084,14 @@ sub create_temp_object( $$ ) {
|
|||||||
my ( $objectfile, $export ) = @_;
|
my ( $objectfile, $export ) = @_;
|
||||||
my $suffix;
|
my $suffix;
|
||||||
|
|
||||||
|
if ( $objectfile eq '-' ) {
|
||||||
|
$verbose = -1;
|
||||||
|
$object = undef;
|
||||||
|
open( $object, '>&STDOUT' ) or fatal_error "Open of STDOUT failed";
|
||||||
|
$file = '-';
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
( $file, $dir, $suffix ) = fileparse( $objectfile );
|
( $file, $dir, $suffix ) = fileparse( $objectfile );
|
||||||
};
|
};
|
||||||
@ -1118,9 +1126,12 @@ sub finalize_object( $ ) {
|
|||||||
my $export = $_[0];
|
my $export = $_[0];
|
||||||
close $object;
|
close $object;
|
||||||
$object = 0;
|
$object = 0;
|
||||||
rename $tempfile, $file or fatal_error "Cannot Rename $tempfile to $file: $!";
|
|
||||||
chmod 0700, $file or fatal_error "Cannot secure $file for execute access";
|
if ( $file ne '-' ) {
|
||||||
progress_message3 "Shorewall configuration compiled to $file" unless $export;
|
rename $tempfile, $file or fatal_error "Cannot Rename $tempfile to $file: $!";
|
||||||
|
chmod 0700, $file or fatal_error "Cannot secure $file for execute access";
|
||||||
|
progress_message3 "Shorewall configuration compiled to $file" unless $export;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -4,6 +4,8 @@ Changes in Shorewall 4.3.10
|
|||||||
|
|
||||||
2) Add WIDE_TC_MARKS option.
|
2) Add WIDE_TC_MARKS option.
|
||||||
|
|
||||||
|
3) Allow compile to STDOUT.
|
||||||
|
|
||||||
Changes in Shorewall 4.3.9
|
Changes in Shorewall 4.3.9
|
||||||
|
|
||||||
1) Logging rules now create separate chain.
|
1) Logging rules now create separate chain.
|
||||||
|
@ -104,6 +104,17 @@ None.
|
|||||||
column) must be >= 65536 (0x10000) and must be a multiple of 65536
|
column) must be >= 65536 (0x10000) and must be a multiple of 65536
|
||||||
(0x1000, 0x20000, 0x30000, ...).
|
(0x1000, 0x20000, 0x30000, ...).
|
||||||
|
|
||||||
|
2. In the 'shorewall compile' command, the filename '-' is now causes
|
||||||
|
the compiled script to be written to Standard Out. As a side
|
||||||
|
effect, the effective VERBOSITY is set to -1 (silent).
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
shorewall compile -- - # Compile /etc/shorewall and send the
|
||||||
|
# output to STDOUT
|
||||||
|
shorewall compile . - # Compile the current working directory
|
||||||
|
# and send the output to STDOUT
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
N E W F E A T U R E S IN 4 . 3
|
N E W F E A T U R E S IN 4 . 3
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user