forked from extern/shorewall_code
Remove she-bang from first line of prog.header*
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
50a29f6858
commit
a548bddea8
@ -81,11 +81,11 @@ sub generate_script_1( $ ) {
|
||||
|
||||
if ( $script ) {
|
||||
if ( $test ) {
|
||||
emit "#!/bin/sh\n#\n# Compiled firewall script generated by Shorewall-perl\n#";
|
||||
emit "#!$config{SHOREWALL_SHELL}\n#\n# Compiled firewall script generated by Shorewall-perl\n#";
|
||||
} else {
|
||||
my $date = localtime;
|
||||
|
||||
emit "#!/bin/sh\n#\n# Compiled firewall script generated by Shorewall $globals{VERSION} - $date\n#";
|
||||
emit "#!$config{SHOREWALL_SHELL}\n#\n# Compiled firewall script generated by Shorewall $globals{VERSION} - $date\n#";
|
||||
|
||||
if ( $family == F_IPV4 ) {
|
||||
copy $globals{SHAREDIRPL} . 'prog.header';
|
||||
|
@ -1442,7 +1442,7 @@ sub close_file() {
|
||||
#
|
||||
# Functions for copying a file into the script
|
||||
#
|
||||
sub copy( $ ) {
|
||||
sub copy( $;$ ) {
|
||||
assert( $script_enabled );
|
||||
|
||||
if ( $script ) {
|
||||
@ -3376,6 +3376,8 @@ sub get_configuration( $$$ ) {
|
||||
|
||||
my ( $export, $update, $annotate ) = @_;
|
||||
|
||||
my $val;
|
||||
|
||||
$globals{EXPORT} = $export;
|
||||
|
||||
our ( $once, @originalinc );
|
||||
@ -3403,6 +3405,18 @@ sub get_configuration( $$$ ) {
|
||||
|
||||
get_capabilities( $export );
|
||||
|
||||
if ( supplied( $val = $config{SHOREWALL_SHELL} ) ) {
|
||||
unless ( $val =~ /^\// ) {
|
||||
if ( $export ) {
|
||||
$val = $config{SHOREWALL_SHELL} = "/bin/$val";
|
||||
warning_message "Assuming SHOREWALL_SHELL=$val";
|
||||
} else {
|
||||
warning_message "Can't find SHOREWALL_SHELL ($val)" unless $config{SHOREWALL_SHELL} = which $val;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$config{SHOREWALL_SHELL} = '/bin/sh';
|
||||
}
|
||||
|
||||
$globals{STATEMATCH} = '-m conntrack --ctstate' if have_capability 'CONNTRACK_MATCH';
|
||||
|
||||
@ -3477,8 +3491,6 @@ sub get_configuration( $$$ ) {
|
||||
|
||||
check_trivalue ( 'IP_FORWARDING', 'on' );
|
||||
|
||||
my $val;
|
||||
|
||||
if ( have_capability( 'KERNELVERSION' ) < 20631 ) {
|
||||
check_trivalue ( 'ROUTE_FILTER', '' );
|
||||
} else {
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 1999-2011 - Tom Eastep (teastep@shorewall.net)
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 1999-2011- Tom Eastep (teastep@shorewall.net)
|
||||
|
Loading…
Reference in New Issue
Block a user