forked from extern/shorewall_code
Handle different layouts on the admin system and remote firewall(s)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8e5bd3637d
commit
5b953cc1dd
@ -190,6 +190,10 @@ Exporter::export_ok_tags('internal');
|
|||||||
|
|
||||||
our $VERSION = 'MODULEVERSION';
|
our $VERSION = 'MODULEVERSION';
|
||||||
|
|
||||||
|
#
|
||||||
|
# The installer will modify this if necessary
|
||||||
|
#
|
||||||
|
use constant { SHAREDIR => '/usr/share' };
|
||||||
#
|
#
|
||||||
# describe the current command, it's present progressive, and it's completion.
|
# describe the current command, it's present progressive, and it's completion.
|
||||||
#
|
#
|
||||||
@ -944,9 +948,10 @@ sub initialize( $;$ ) {
|
|||||||
snmp => 'snmp',
|
snmp => 'snmp',
|
||||||
tftp => 'tftp',
|
tftp => 'tftp',
|
||||||
);
|
);
|
||||||
|
#
|
||||||
|
# Process the global shorewallrc file
|
||||||
process_shorewallrc( $shorewallrc ) if $shorewallrc;
|
#
|
||||||
|
process_shorewallrc( SHAREDIR . '/shorewall/shorewallrc' );
|
||||||
|
|
||||||
$globals{SHAREDIRPL} = "$shorewallrc{SHAREDIR}/shorewall/";
|
$globals{SHAREDIRPL} = "$shorewallrc{SHAREDIR}/shorewall/";
|
||||||
|
|
||||||
@ -962,6 +967,10 @@ sub initialize( $;$ ) {
|
|||||||
$globals{PRODUCT} = 'shorewall6';
|
$globals{PRODUCT} = 'shorewall6';
|
||||||
$config{IP6TABLES} = undef;
|
$config{IP6TABLES} = undef;
|
||||||
}
|
}
|
||||||
|
#
|
||||||
|
# If we are compiling for export, process the shorewallrc from the remote system
|
||||||
|
#
|
||||||
|
process_shorewallrc( $shorewallrc ) if $shorewallrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
my @abbr = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
|
my @abbr = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
|
||||||
|
@ -1051,6 +1051,10 @@ if [ -d Perl ]; then
|
|||||||
install_file $f ${DESTDIR}${PERLLIBDIR}/$f 0644
|
install_file $f ${DESTDIR}${PERLLIBDIR}/$f 0644
|
||||||
echo "Module ${f%.*} installed as ${DESTDIR}${PERLLIBDIR}/$f"
|
echo "Module ${f%.*} installed as ${DESTDIR}${PERLLIBDIR}/$f"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ $SHAREDIR != /usr/share ]; then
|
||||||
|
eval perl -p -i -e \'s\|SHAREDIR => \(.\)/usr/share\|SHAREDIR => \\${1}${SHAREDIR}/\|\' ${DESTDIR}${PERLLIBDIR}/Config.pm
|
||||||
|
fi
|
||||||
#
|
#
|
||||||
# Install the program skeleton files
|
# Install the program skeleton files
|
||||||
#
|
#
|
||||||
|
@ -401,10 +401,11 @@ compiler() {
|
|||||||
shorewallrc=$(find_file shorewallrc)
|
shorewallrc=$(find_file shorewallrc)
|
||||||
[ -f "$shorewallrc" ] || fatal_error "Compiling for export requires a shorewallrc file"
|
[ -f "$shorewallrc" ] || fatal_error "Compiling for export requires a shorewallrc file"
|
||||||
else
|
else
|
||||||
shorewallrc="${g_basedir}/shorewallrc"
|
shorewallrc=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
options="--verbose=$VERBOSITY --family=$g_family --config_path=$CONFIG_PATH --shorewallrc=${shorewallrc}"
|
options="--verbose=$VERBOSITY --family=$g_family --config_path=$CONFIG_PATH"
|
||||||
|
[ -n "$shorewallrc" ] && options="$options --shorewallrc=${shorewallrc}"
|
||||||
[ -n "$STARTUP_LOG" ] && options="$options --log=$STARTUP_LOG"
|
[ -n "$STARTUP_LOG" ] && options="$options --log=$STARTUP_LOG"
|
||||||
[ -n "$LOG_VERBOSITY" ] && options="$options --log_verbosity=$LOG_VERBOSITY";
|
[ -n "$LOG_VERBOSITY" ] && options="$options --log_verbosity=$LOG_VERBOSITY";
|
||||||
[ -n "$g_export" ] && options="$options --export"
|
[ -n "$g_export" ] && options="$options --export"
|
||||||
|
Loading…
Reference in New Issue
Block a user