3 # kinstall/minstall - install patches to kernel sources
5 # WARNING: This script should be run exactly once on a virgin system
7 PATH=/sbin:/usr/sbin:/bin:/usr/bin; export PATH
9 # try to bomb out fast if anything fails....
15 archdir="/sys/arch/$karch"
16 confdir="$archdir/conf"
25 for i in ip_fil.[ch] ip_nat.[ch] ip_frag.[ch] ip_state.[ch] fil.c ip_compat.h ip_proxy.[ch] ip_ftp_pxy.c ip_auth.[ch] ip_log.c
27 echo -n "/sys/netinet/$i "
28 /bin/rm -f /sys/netinet/$i
32 if [ -f /sys/netinet/ipfbackup.tar ] ; then
33 echo -n "Restoring old kernel sources"
34 ( cd /sys/netinet ; tar xpf ipfbackup.tar )
38 echo "Unpatching /sys/conf/files ..."
39 cat OpenBSD-2/files.diffs | (cd /sys/conf; patch -R)
41 echo -n "Kernel configuration to update [GENERIC] "
44 if [ -n "$newconfig" ] ; then
45 config="$confdir/$newconfig"
47 newconfig="$confdir/GENERIC"
50 mv $archdir/compile/$newconfig $archdir/compile/$newconfig.bak
51 egrep -v 'IPFILTER' $confdir/$newconfig.bak > $confdir/$newconfig
52 echo 'You will now need to run "config" and build a new kernel.'