From 666ae8701f811a0b4a1941fdbc880177ec6f1c44 Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 28 May 2004 00:08:14 +0000 Subject: [PATCH] Fix module load/detect capability order git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1366 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- STABLE2/changelog.txt | 2 ++ STABLE2/firewall | 38 +++++++++++++++++++++----------------- STABLE2/releasenotes.txt | 3 +++ 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/STABLE2/changelog.txt b/STABLE2/changelog.txt index e0916fe3f..99eadeb66 100644 --- a/STABLE2/changelog.txt +++ b/STABLE2/changelog.txt @@ -69,3 +69,5 @@ Changes since 2.0.1 33) Create /var/lib/shorewall if it doesn't exist. 34) Fix dynamic in chains in the nat table. + +35) Load modules before detecting capabilities. diff --git a/STABLE2/firewall b/STABLE2/firewall index 8f87e5e58..df295caac 100755 --- a/STABLE2/firewall +++ b/STABLE2/firewall @@ -2285,7 +2285,7 @@ check_config() { verify_os_version - load_kernel_modules + load_kernel_modules check echo "Determining Zones..." @@ -4527,30 +4527,32 @@ add_ip_aliases() # # Load kernel modules required for Shorewall # -load_kernel_modules() { +load_kernel_modules() #1 = command +{ [ -z "$MODULESDIR" ] && \ - MODULESDIR=/lib/modules/$osversion/kernel/net/ipv4/netfilter + MODULESDIR=/lib/modules/$(uname -r)/kernel/net/ipv4/netfilter modules=$(find_file modules) if [ -f $modules -a -d $MODULESDIR ]; then - echo "Loading Modules..." + [ "$1" = silent ] || echo "Loading Modules..." . $modules + case $1 in + start|restart) + save_command "reload_kernel_modules <