/usr/share/fwbuilder-5.1.0.3599/configlets/linux24/load_modules is in fwbuilder-common 5.1.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ## -*- mode: shell-script; -*-
##
## To be able to make changes to the part of configuration created
## from this configlet you need to copy this file to the directory
## fwbuilder/configlets/linux24/ in your home directory and modify it.
## Double "##" comments are removed during processing but single "#"
## comments are be retained and appear in the generated script. Empty
## lines are removed as well.
##
## Configlets support simple macro language with these constructs:
## {{$var}} is variable expansion
## {{if var}} is conditional operator.
##
## This is the body of the shell function load_modules(). I keep
## function definition in the script_skeleton configlet to make it
## more readable (the function and call to it are in the file, both
## clearly visible). I could put the code for the body of load_modules
## function in the script_skeleton configlet as well, but I keep it
## separate to make script_skeleton small and clean.
##
## Function load_modules is called with one parameter. This parameter
## is a space-separated list of options. Options (words) "nat" and
## "ipv6" are recognized. PArameter can be "", "nat", "ipv6",
## "nat ipv6" If word "nat" is included, the function should also load
## modules for nat. If word "ipv6" is included, it should also load
## module nf_conntrack_ipv6
{{if load_modules}}
OPTS=$1
MODULES_DIR="{{$modules_dir}}"
MODULES=$(find $MODULES_DIR -name '*conntrack*' \! -name '*ipv6*'|sed -e 's/^.*\///' -e 's/\([^\.]\)\..*/\1/')
echo $OPTS | grep -q nat && {
MODULES="$MODULES $(find $MODULES_DIR -name '*nat*'|sed -e 's/^.*\///' -e 's/\([^\.]\)\..*/\1/')"
}
echo $OPTS | grep -q ipv6 && {
MODULES="$MODULES $(find $MODULES_DIR -name nf_conntrack_ipv6|sed -e 's/^.*\///' -e 's/\([^\.]\)\..*/\1/')"
}
for module in $MODULES; do
if $LSMOD | grep ${module} >/dev/null; then continue; fi
$MODPROBE ${module} || exit 1
done
{{endif}}
|