Supporting xz compressed kernel modules

- I've attached a patch that adds xz support to the default MODULE_SUFFIX.
- I'm wondering it wouldn't be better to not have MODULE_SUFFX=ko in various
sample configs so that the default value is used instead:

./Shorewall/configfiles/shorewall.conf:MODULE_SUFFIX=ko
./Shorewall/Samples/Universal/shorewall.conf:MODULE_SUFFIX=ko
./Shorewall/Samples/three-interfaces/shorewall.conf:MODULE_SUFFIX=ko
./Shorewall/Samples/two-interfaces/shorewall.conf:MODULE_SUFFIX=ko
./Shorewall/Samples/one-interface/shorewall.conf:MODULE_SUFFIX=ko
./docs/MultiISP.xml:MODULE_SUFFIX=ko
./docs/MyNetwork.xml:MODULE_SUFFIX=ko
./Shorewall6/configfiles/shorewall6.conf:MODULE_SUFFIX=ko
./Shorewall6/Samples6/Universal/shorewall6.conf:MODULE_SUFFIX=ko
./Shorewall6/Samples6/three-interfaces/shorewall6.conf:MODULE_SUFFIX=ko
./Shorewall6/Samples6/two-interfaces/shorewall6.conf:MODULE_SUFFIX=ko
./Shorewall6/Samples6/one-interface/shorewall6.conf:MODULE_SUFFIX=ko

- Is:

MODULE_SUFFIX=

sufficient to use the default value or does it need to be commented out?

Thanks,

  Orion

--
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion@nwra.com
Boulder, CO 80301                   http://www.nwra.com

>From f13edf8fc07c7b62825408b8665b10d6014d368d Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion@cora.nwra.com>
Date: Mon, 26 Jan 2015 09:48:48 -0700
Subject: [PATCH] Support xz compressed modules

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Orion Poplawski 2015-01-27 13:43:42 -07:00 committed by Tom Eastep
parent 40104d0c86
commit 9ad0b297e2
6 changed files with 9 additions and 9 deletions

View File

@ -374,7 +374,7 @@ reload_kernel_modules() {
moduleloader=insmod moduleloader=insmod
fi fi
[ -n "${MODULE_SUFFIX:=ko ko.gz o o.gz gz}" ] [ -n "${MODULE_SUFFIX:=ko ko.gz ko.xz o o.gz o.xz gz xz}" ]
[ -z "$MODULESDIR" ] && \ [ -z "$MODULESDIR" ] && \
uname=$(uname -r) && \ uname=$(uname -r) && \
@ -413,7 +413,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
moduleloader=insmod moduleloader=insmod
fi fi
[ -n "${MODULE_SUFFIX:=o gz ko o.gz ko.gz}" ] [ -n "${MODULE_SUFFIX:=o gz xz ko o.gz o.xz ko.gz ko.xz}" ]
[ -z "$MODULESDIR" ] && \ [ -z "$MODULESDIR" ] && \
uname=$(uname -r) && \ uname=$(uname -r) && \

View File

@ -38,7 +38,7 @@
# #
# IPTABLES - iptables # IPTABLES - iptables
# MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter # MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter
# MODULE_SUFFIX - "o gz ko o.gz ko.gz" # MODULE_SUFFIX - "o gz xz ko o.gz o.xz ko.gz ko.xz"
# #
# Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is # Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is
# used during firewall compilation, then the generated firewall program will likewise not # used during firewall compilation, then the generated firewall program will likewise not

View File

@ -3862,7 +3862,7 @@ sub load_kernel_modules( ) {
close LSMOD; close LSMOD;
$config{MODULE_SUFFIX} = 'o gz ko o.gz ko.gz' unless $config{MODULE_SUFFIX}; $config{MODULE_SUFFIX} = 'o gz xz ko o.gz o.xz ko.gz ko.xz' unless $config{MODULE_SUFFIX};
my @suffixes = split /\s+/ , $config{MODULE_SUFFIX}; my @suffixes = split /\s+/ , $config{MODULE_SUFFIX};

View File

@ -1784,8 +1784,8 @@ LOG:info:,bar net fw</programlisting>
<listitem> <listitem>
<para>The value of this option determines the possible file <para>The value of this option determines the possible file
extensions of kernel modules. The default value is "ko ko.gz o o.gz extensions of kernel modules. The default value is "ko ko.gz ko.xz o o.gz
gz".</para> o.xz gz xz".</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -38,7 +38,7 @@
# #
# IPTABLES - iptables # IPTABLES - iptables
# MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter # MODULESDIR - /lib/modules/$(uname -r)/kernel/net/ipv4/netfilter
# MODULE_SUFFIX - "o gz ko o.gz ko.gz" # MODULE_SUFFIX - "o gz xz ko o.gz o.xz ko.gz ko.xz"
# #
# Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is # Shorewall need not be installed on the target system to run shorecap. If the '-e' flag is
# used during firewall compilation, then the generated firewall program will likewise not # used during firewall compilation, then the generated firewall program will likewise not

View File

@ -1588,8 +1588,8 @@ LOG:info:,bar net fw</programlisting>
<listitem> <listitem>
<para>The value of this option determines the possible file <para>The value of this option determines the possible file
extensions of kernel modules. The default value is "ko ko.gz o o.gz extensions of kernel modules. The default value is "ko ko.gz ko.xz o o.gz
gz".</para> o.xz gz xz".</para>
</listitem> </listitem>
</varlistentry> </varlistentry>