Tweak USE_LOCAL_MODULES change

Make the "Other than /usr/share" test dependent on export

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-02-06 08:25:51 -08:00
parent 946602bc1c
commit 2b8579c090

View File

@ -339,7 +339,7 @@ sub generate_script_3($) {
if ( $export || $config{USE_LOCAL_MODULES} ) {
my $fn = find_file( $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules' );
if ( -f $fn && ( $config{USE_LOCAL_MODULES} || ! $fn =~ "^$globals{SHAREDIR}/" ) ) {
if ( -f $fn && ( $config{USE_LOCAL_MODULES} || ( $export && ! $fn =~ "^$globals{SHAREDIR}/" ) ) ) {
emit 'echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir';
emit 'cat > ${VARDIR}/.modules << EOF';
open_file $fn;