mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 08:03:11 +01:00
Correct module loading in the compiler
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
fb831e3128
commit
85a7ec6fe5
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user