From 85a7ec6fe5a1ac79527b05eb42665ed6cda0a73f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 14 Sep 2017 15:08:38 -0700 Subject: [PATCH] Correct module loading in the compiler Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index e1bb9fb8e..76015ad97 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -4288,7 +4288,7 @@ sub which( $ ) { # Load the kernel modules defined in the 'modules' file. # sub load_kernel_modules( ) { - my $moduleloader = which( 'modprobe' ) || ( which 'insmod' ); + my $moduleloader = which( 'modprobe' ) || which( 'insmod' ); my $modulesdir = $config{MODULESDIR}; @@ -4326,7 +4326,7 @@ sub load_kernel_modules( ) { fatal_error "Invalid modules file entry" unless ( $currentline =~ /^loadmodule\s+([a-zA-Z]\w*)\s*(.*)$/ ); my ( $module, $arguments ) = ( $1, $2 ); unless ( $loadedmodules{ $module } ) { - if ( $moduleloader eq 'modprobe' ) { + if ( $moduleloader =~ /modprobe$/ ) { system( "modprobe -q $module $arguments" ); $loadedmodules{ $module } = 1; } else {