From 5e57c895b3aa3c77aa44a92727bbb6dc068fde61 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 8 Oct 2018 13:17:15 -0700 Subject: [PATCH] Avoid emacs issues with compiled code - handle embedded spaces in moduledir path names Signed-off-by: Tom Eastep --- Shorewall-core/lib.common | 4 ++-- Shorewall/Perl/Shorewall/Compiler.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall-core/lib.common b/Shorewall-core/lib.common index a189c4440..8b8721e12 100644 --- a/Shorewall-core/lib.common +++ b/Shorewall-core/lib.common @@ -1,7 +1,7 @@ # # Shorewall 5.2 -- /usr/share/shorewall/lib.common # -# (c) 2010-2017 - Tom Eastep (teastep@shorewall.net) +# (c) 2010-2018 - Tom Eastep (teastep@shorewall.net) # # Complete documentation is available at http://shorewall.net # @@ -419,7 +419,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR . $modules if [ $savemoduleinfo = Yes ]; then [ -d ${VARDIR} ] || mkdir -p ${VARDIR} - echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir + echo MODULESDIR=\"$MODULESDIR\" > ${VARDIR}/.modulesdir cp -f $modules ${VARDIR}/.modules fi elif [ $savemoduleinfo = Yes ]; then diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index b604caadf..b47319fc7 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -4,7 +4,7 @@ # # This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] # -# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net) +# (c) 2007-2018 - Tom Eastep (teastep@shorewall.net) # # Complete documentation is available at http://shorewall.net # @@ -382,7 +382,7 @@ sub generate_script_3() { my $fn = find_file( $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules' ); if ( -f $fn && ( $config{EXPORTMODULES} || ( $export && ! $fn =~ "^$globals{SHAREDIR}/" ) ) ) { - emit 'echo MODULESDIR="$MODULESDIR" > ${VARDIR}/.modulesdir'; + emit 'echo MODULESDIR=\"$MODULESDIR\" > ${VARDIR}/.modulesdir'; emit 'cat > ${VARDIR}/.modules << EOF'; open_file $fn;