mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 12:09:14 +01:00
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';
|
||||
|
||||
#
|
||||
# The installer will modify this if necessary
|
||||
#
|
||||
use constant { SHAREDIR => '/usr/share' };
|
||||
#
|
||||
# describe the current command, it's present progressive, and it's completion.
|
||||
#
|
||||
@ -944,9 +948,10 @@ sub initialize( $;$ ) {
|
||||
snmp => 'snmp',
|
||||
tftp => 'tftp',
|
||||
);
|
||||
|
||||
|
||||
process_shorewallrc( $shorewallrc ) if $shorewallrc;
|
||||
#
|
||||
# Process the global shorewallrc file
|
||||
#
|
||||
process_shorewallrc( SHAREDIR . '/shorewall/shorewallrc' );
|
||||
|
||||
$globals{SHAREDIRPL} = "$shorewallrc{SHAREDIR}/shorewall/";
|
||||
|
||||
@ -962,6 +967,10 @@ sub initialize( $;$ ) {
|
||||
$globals{PRODUCT} = 'shorewall6';
|
||||
$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 );
|
||||
|
@ -1051,6 +1051,10 @@ if [ -d Perl ]; then
|
||||
install_file $f ${DESTDIR}${PERLLIBDIR}/$f 0644
|
||||
echo "Module ${f%.*} installed as ${DESTDIR}${PERLLIBDIR}/$f"
|
||||
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
|
||||
#
|
||||
|
@ -401,10 +401,11 @@ compiler() {
|
||||
shorewallrc=$(find_file shorewallrc)
|
||||
[ -f "$shorewallrc" ] || fatal_error "Compiling for export requires a shorewallrc file"
|
||||
else
|
||||
shorewallrc="${g_basedir}/shorewallrc"
|
||||
shorewallrc=
|
||||
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 "$LOG_VERBOSITY" ] && options="$options --log_verbosity=$LOG_VERBOSITY";
|
||||
[ -n "$g_export" ] && options="$options --export"
|
||||
|
Loading…
Reference in New Issue
Block a user