forked from extern/shorewall_code
Accomodate kernel version 3.0
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
18e3dd40e6
commit
a992ec594a
@ -2332,6 +2332,8 @@ sub determine_kernelversion() {
|
|||||||
|
|
||||||
if ( $kernelversion =~ /^(\d+)\.(\d+).(\d+)/ ) {
|
if ( $kernelversion =~ /^(\d+)\.(\d+).(\d+)/ ) {
|
||||||
$capabilities{KERNELVERSION} = sprintf "%d%02d%02d", $1 , $2 , $3;
|
$capabilities{KERNELVERSION} = sprintf "%d%02d%02d", $1 , $2 , $3;
|
||||||
|
} elsif ( $kernelversion =~ /^(\d+)\.(\d+)/ ) {
|
||||||
|
$capabilities{KERNELVERSION} = sprintf "%d%02d00", $1 , $2;
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Unrecognized Kernel Version Format ($kernelversion)";
|
fatal_error "Unrecognized Kernel Version Format ($kernelversion)";
|
||||||
}
|
}
|
||||||
|
@ -1882,7 +1882,17 @@ determine_capabilities() {
|
|||||||
[ -n "$IP" ] && $IP rule add help 2>&1 | grep -q /MASK && FWMARK_RT_MASK=Yes
|
[ -n "$IP" ] && $IP rule add help 2>&1 | grep -q /MASK && FWMARK_RT_MASK=Yes
|
||||||
|
|
||||||
CAPVERSION=$SHOREWALL_CAPVERSION
|
CAPVERSION=$SHOREWALL_CAPVERSION
|
||||||
KERNELVERSION=$(printf "%d%02d%02d" $(uname -r 2> /dev/null | sed -e 's/-.*//' -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
|
|
||||||
|
KERNELVERSION=$(uname -r 2> /dev/null | sed -e 's/-.*//')
|
||||||
|
|
||||||
|
case "$KERNELVERSION" in
|
||||||
|
*.*.*)
|
||||||
|
KERNELVERSION=$(printf "%d%02d%02d" $(echo $KERNELVERSION | sed -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
KERNELVERSION=$(printf "%d%02d00" $(echo $KERNELVERSION | sed -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2/g'))
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
report_capabilities() {
|
report_capabilities() {
|
||||||
|
@ -1712,7 +1712,17 @@ determine_capabilities() {
|
|||||||
[ -n "$IP" ] && $IP rule add help 2>&1 | grep -q /MASK && FWMARK_RT_MASK=Yes
|
[ -n "$IP" ] && $IP rule add help 2>&1 | grep -q /MASK && FWMARK_RT_MASK=Yes
|
||||||
|
|
||||||
CAPVERSION=$SHOREWALL_CAPVERSION
|
CAPVERSION=$SHOREWALL_CAPVERSION
|
||||||
KERNELVERSION=$(printf "%d%02d%02d" $(uname -r 2> /dev/null | sed -e 's/-.*//' -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
|
|
||||||
|
KERNELVERSION=$(uname -r 2> /dev/null | sed -e 's/-.*//')
|
||||||
|
|
||||||
|
case "$KERNELVERSION" in
|
||||||
|
*.*.*)
|
||||||
|
KERNELVERSION=$(printf "%d%02d%02d" $(echo $KERNELVERSION | sed -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2 \3/g'))
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
KERNELVERSION=$(printf "%d%02d00" $(echo $KERNELVERSION | sed -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$/\1 \2/g'))
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
report_capabilities() {
|
report_capabilities() {
|
||||||
|
Loading…
Reference in New Issue
Block a user