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 ) cd ..
10 echo "Patching ip_input.c, ip_output.c and in_proto.c"
11 cat FreeBSD/ip_{in,out}put.c.diffs FreeBSD/in_proto.c.diffs | \
12 (cd /sys/netinet; patch)
14 if ( -f /sys/conf/files.newconf ) then
15 echo "Patching /sys/conf/files.newconf"
16 cat FreeBSD/files.newconf.diffs | (cd /sys/conf; patch)
17 echo "Patching /sys/conf/files"
18 cat FreeBSD/files.diffs | (cd /sys/conf; patch)
20 if ( -f /sys/conf/files.oldconf ) then
21 echo "Patching /sys/conf/files.oldconf"
22 cat FreeBSD/files.oldconf.diffs | (cd /sys/conf; patch)
23 echo "Patching /sys/conf/files"
24 cat FreeBSD/filez.diffs | (cd /sys/conf; patch)
27 set config=`(cd $confdir; /bin/ls -1t [0-9A-Z_]*) | head -1`
28 echo -n "Kernel configuration to update [$config] "
30 if ( "$newconfig" != "" ) then
31 set config="$confdir/$newconfig"
35 echo "Re-config'ing $newconfig..."
36 if ( -f $confdir/$newconfig ) then
37 mv $confdir/$newconfig $confdir/$newconfig.bak
39 if ( -d $archdir/../compile/$newconfig ) then
42 while ( -d $archdir/../compile/${newconfig}.${bak} )
44 set dot=`expr 1 + $dot`
46 mv $archdir/../compile/$newconfig $archdir/../compile/${newconfig}.$bak
48 awk '{print $0;if($2=="INET"){print"options IPFILTER_LKM"}}' \
49 $confdir/$newconfig.bak > $confdir/$newconfig
50 echo 'You will now need to run "config" and build a new kernel.'