Fix miscellanious size_t related compiler warnings.
[dragonfly.git] / contrib / ipfilter / FreeBSD-2.2 / minstall
blob832b68e81a639eced786b8d51779a2ec532e80cb
1 #!/bin/csh -f
3 set dir=`pwd`
4 set karch=`uname -m`
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] "
16 set newconfig=$<
17 if ( "$newconfig" != "" ) then
18 set config="$confdir/$newconfig"
19 else
20 set newconfig=$config
21 endif
22 echo "Re-config'ing $newconfig..."
23 if ( -f $confdir/$newconfig ) then
24 mv $confdir/$newconfig $confdir/$newconfig.bak
25 endif
26 if ( -d $archdir/../compile/$newconfig ) then
27 set bak=".bak"
28 set dot=0
29 while ( -d $archdir/../compile/${newconfig}${bak} )
30 set bak=".bak."$dot
31 set dot=`expr 1 + $dot`
32 end
33 mv $archdir/../compile/$newconfig $archdir/../compile/${newconfig}$bak
34 endif
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.'
38 exit 0