diff options
Diffstat (limited to 'contrib/ipfilter/FreeBSD-4.0/kinstall')
-rwxr-xr-x | contrib/ipfilter/FreeBSD-4.0/kinstall | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/ipfilter/FreeBSD-4.0/kinstall b/contrib/ipfilter/FreeBSD-4.0/kinstall index cb3c3da..7e663d2 100755 --- a/contrib/ipfilter/FreeBSD-4.0/kinstall +++ b/contrib/ipfilter/FreeBSD-4.0/kinstall @@ -2,6 +2,7 @@ # set dir=`pwd` set karch=`uname -m` +set krev=`uname -r|sed -e 's/\([0-9\.]*\)-.*/\1/'` if ( -d /sys/arch/$karch ) set archdir="/sys/arch/$karch" if ( -d /sys/$karch ) set archdir="/sys/$karch" set confdir="$archdir/conf" @@ -21,7 +22,7 @@ ln -s /usr/include/osreldate.h /sys/sys/osreldate.h echo "" echo "Patching ip6_input.c and ip6_output.c" -cat FreeBSD-4.0/ipv6-patch | (cd /sys/netinet6; patch) +cat FreeBSD-4.0/ipv6-patch-$krev | (cd /sys/netinet6; patch) set config=`(cd $confdir; /bin/ls -1t [0-9A-Z_]*) | head -1` echo -n "Kernel configuration to update [$config] " @@ -31,6 +32,11 @@ if ( "$newconfig" != "" ) then else set newconfig=$config endif +grep -q IPFILTER $confdir/$newconfig +if ($status == 0) then + echo "IPFilter already configured in kernel config file" + exit 0 +endif echo "Rewriting $newconfig..." if ( -f $confdir/$newconfig ) then mv $confdir/$newconfig $confdir/$newconfig.bak |