5 if ( -d /sys
/arch
/$karch ) set archdir
="/sys/arch/$karch"
6 if ( -d /sys
/$karch ) set archdir
="/sys/$karch"
7 set confdir
="$archdir/conf"
9 if ( $dir =~
*/FreeBSD-2.2
) cd ..
10 echo "Patching ip_input.c, ip_output.c and in_proto.c"
11 cat FreeBSD-2.2
/ip_
{in,out
}put.c.diffs FreeBSD-2.2
/in_proto.c.diffs | \
12 (cd /sys
/netinet
; patch)
14 set config
=`(cd $confdir; /bin/ls -1t [0-9A-Z_]*) | head -1`
15 echo -n "Kernel configuration to update [$config] "
17 if ( "$newconfig" != "" ) then
18 set config
="$confdir/$newconfig"
22 echo "Re-config'ing $newconfig..."
23 if ( -f $confdir/$newconfig ) then
24 mv $confdir/$newconfig $confdir/$newconfig.bak
26 if ( -d $archdir/..
/compile
/$newconfig ) then
29 while ( -d $archdir/..
/compile
/${newconfig}${bak} )
31 set dot
=`expr 1 + $dot`
33 mv $archdir/..
/compile
/$newconfig $archdir/..
/compile
/${newconfig}$bak
35 awk '{print $0;if($2=="INET"){print"options IPFILTER_LKM\noptions IPFILTER_LOG"}}' \
36 $confdir/$newconfig.bak
> $confdir/$newconfig
37 echo 'You will now need to run "config" and build a new kernel.'