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 -n "Uninstalling "
11 foreach i
(ip_fil.
[ch
] ip_nat.
[ch
] ip_frag.
[ch
] ip_state.
[ch
] fil.c \
12 ip_auth.
[ch
] ip_proxy.
[ch
] ip_ftp_pxy.c ip_compat.h ip_log.c \
15 /bin
/rm -f /sys
/netinet
/$i
18 echo "Unpatching ip_input.c, ip_output.c and in_proto.c"
19 cat FreeBSD-2.2
/ip_
{in,out
}put.c.diffs FreeBSD-2.2
/in_proto.c.diffs | \
20 (cd /sys
/netinet
; patch -R)
22 if ( -f /sys
/conf
/files.newconf
) then
23 echo "Unpatching /sys/conf/files.newconf"
24 cat FreeBSD-2.2
/files.newconf.diffs |
(cd /sys
/conf
; patch -R)
25 echo "Unpatching /sys/conf/files"
26 cat FreeBSD-2.2
/files.diffs |
(cd /sys
/conf
; patch -R)
28 if ( -f /sys
/conf
/files.oldconf
) then
29 echo "Unpatching /sys/conf/files.oldconf"
30 cat FreeBSD-2.2
/files.oldconf.diffs |
(cd /sys
/conf
; patch -R)
31 echo "Unpatching /sys/conf/files"
32 cat FreeBSD-2.2
/filez.diffs |
(cd /sys
/conf
; patch -R)
35 set config
=`(cd $confdir; /bin/ls -1t [0-9A-Z_]*) | head -1`
36 echo -n "Kernel configuration to update [$config] "
38 if ( "$newconfig" != "" ) then
39 set config
="$confdir/$newconfig"
43 if ( -f $confdir/$newconfig ) then
44 mv $confdir/$newconfig $confdir/$newconfig.bak
46 if ( -d $archdir/..
/compile
/$newconfig ) then
49 while ( -d $archdir/..
/compile
/${newconfig}.
${bak} )
51 set dot
=`expr 1 + $dot`
53 mv $archdir/..
/compile
/$newconfig $archdir/..
/compile
/${newconfig}.
${bak}
55 egrep -v IPFILTER
$confdir/$newconfig.bak
> $confdir/$newconfig
56 echo 'You will now need to run "config" and build a new kernel.'