Compiler changes for Shorewall[6]-lite relocation

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep
2012-04-02 07:46:38 -07:00
parent a11e2dd452
commit 348c99c7d0
3 changed files with 31 additions and 35 deletions

View File

@@ -366,6 +366,8 @@ uptodate() {
#
compiler() {
local pc
local shorewallrc
pc=$g_libexec/shorewall/compiler.pl
if [ $(id -u) -ne 0 ]; then
@@ -401,7 +403,14 @@ compiler() {
[ "$1" = nolock ] && shift;
shift
options="--verbose=$VERBOSITY --family=$g_family --config_path=$CONFIG_PATH --shorewallrc=${g_sharedir}/shorewall/shorewallrc"
if [ -n "$g_export" ]; then
shorewallrc=$(find_file shorewallrc)
[ -f "$shorewallrc" ] || fatal_error "Compiling for export requires a shorewallrc file"
else
shorewallrc="${g_sharedir}/shorewall/shorewallrc"
fi
options="--verbose=$VERBOSITY --family=$g_family --config_path=$CONFIG_PATH --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"