Package: firehol
Version: 1.296-2
Severity: normal
Tags: patch
Attached patch solves the bug in subject in a more elegant way.
Still, there are more bugs :( Running the script using 'set -e' (errexit)
reveals more.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.8-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages firehol depends on:
ii bash 4.2+dfsg-1
ii iproute 20120521-3+b4
ii iptables 1.4.18-1
ii lsb-base 4.1+Debian9
Versions of packages firehol recommends:
ii aggregate 1.6-7
ii curl 7.30.0-2
ii kmod 9-3
ii wget 1.14-1
Versions of packages firehol suggests:
ii ulogd 1.24-3.3
-- Configuration Files:
/etc/default/firehol changed [not included]
/etc/firehol/firehol.conf changed [not included]
-- no debconf information
-- debsums errors found:
debsums: changed file /sbin/firehol (from firehol package)
Cheers,
--
Cristian
--- /sbin/firehol-1.296-2 2013-05-11 21:20:20.340860813 +0200
+++ /sbin/firehol 2013-05-11 21:23:34.497319586 +0200
@@ -5773,8 +5773,16 @@
exit 0
fi
-KERNELMAJ=`${UNAME_CMD} -r | ${SED_CMD} -e 's,\..*,,'`
-KERNELMIN=`${UNAME_CMD} -r | ${SED_CMD} -e 's,[^\.]*\.,,' -e 's,\..*,,'`
+kernel_maj_min() {
+ local kmaj kmin IFS=.-
+
+ kmaj=$1
+ kmin=$2
+
+ set -- $(uname -r)
+ eval $kmaj=\$1 $kmin=\$2
+}
+kernel_maj_min KERNELMAJ KERNELMIN
if [ "$KERNELMAJ" -lt 2 ] ; then
echo >&2 "FireHOL requires a kernel version higher than 2.3."